You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fixes some incorrectly resolved conflicts during the rebase in #579fixes#632
- **fix#607 - no longer need to manually include for toctree**
- **semver note**
- **fix rest of incorrectly resolved conflicts in index.rst**
Copy file name to clipboardexpand all lines: index.rst
+63-21
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ testcontainers-python
13
13
testcontainers-python facilitates the use of Docker containers for functional and integration testing. The collection of packages currently supports the following features.
14
14
15
15
.. toctree::
16
+
:maxdepth:1
16
17
17
18
core/README
18
19
modules/index
@@ -59,12 +60,15 @@ Installation
59
60
------------
60
61
61
62
The suite of testcontainers packages is available on `PyPI <https://pypi.org/project/testcontainers/>`_,
62
-
and individual packages can be installed using :code:`pip`.
63
+
the package can be installed using :code:`pip`.
63
64
64
-
Version `4.0.0` onwards we do not support the `testcontainers-*` packages as it is unsutainable to maintain ownership.
65
+
Version `4.0.0` onwards we do not support the `testcontainers-*` packages as it is unsustainable to maintain ownership.
65
66
66
67
Instead packages can be installed by specifying `extras <https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies>`__, e.g., :code:`pip install testcontainers[postgres]`.
67
68
69
+
Please note, that community modules are supported on a best-effort basis and breaking changes DO NOT create major versions in the package.
70
+
Therefore, only the package core is strictly following SemVer. If your workflow is broken by a minor update, please look at the changelogs for guidance.
71
+
68
72
69
73
Custom Containers
70
74
-----------------
@@ -80,40 +84,77 @@ For common use cases, you can also use the generic containers provided by the `t
80
84
Docker in Docker (DinD)
81
85
-----------------------
82
86
83
-
When trying to launch a testcontainer from within a Docker container, e.g., in continuous integration testing, two things have to be provided:
87
+
When trying to launch Testcontainers from within a Docker container, e.g., in continuous integration testing, two things have to be provided:
84
88
85
89
1. The container has to provide a docker client installation. Either use an image that has docker pre-installed (e.g. the `official docker images <https://hub.docker.com/_/docker>`_) or install the client from within the `Dockerfile` specification.
86
90
2. The container has to have access to the docker daemon which can be achieved by mounting `/var/run/docker.sock` or setting the `DOCKER_HOST` environment variable as part of your `docker run` command.
87
91
92
+
93
+
Private Docker registry
94
+
-----------------------
95
+
96
+
Using a private docker registry requires the `DOCKER_AUTH_CONFIG` environment variable to be set.
We recommend you use a `virtual environment <https://virtualenv.pypa.io/en/stable/>`_ for development (:code:`python>=3.7` is required). After setting up your virtual environment, you can install all dependencies and test the installation by running the following snippet.
142
+
143
+
We recommend you use a `Poetry <https://python-poetry.org/docs/>`_ for development.
144
+
After having installed `poetry`, you can run the following snippet to set up your local dev environment.
107
145
108
146
.. code-block:: bash
109
147
110
-
poetry install --all-extras
111
-
make <your-module>/tests
148
+
make install
112
149
113
150
Package Structure
114
151
^^^^^^^^^^^^^^^^^
115
152
116
-
Testcontainers is a collection of `implicit namespace packages <https://peps.python.org/pep-0420/>`__ to decouple the development of different extensions, e.g., :code:`testcontainers-mysql` and :code:`testcontainers-postgres` for MySQL and PostgreSQL database containers, respectively. The folder structure is as follows.
153
+
Testcontainers is a collection of `implicit namespace packages <https://peps.python.org/pep-0420/>`__
154
+
to decouple the development of different extensions,
155
+
e.g., :code:`testcontainers[mysql]` and :code:`testcontainers[postgres]` for MySQL and PostgreSQL database containers, respectively.
156
+
157
+
The folder structure is as follows:
117
158
118
159
.. code-block:: bash
119
160
@@ -133,10 +174,11 @@ Testcontainers is a collection of `implicit namespace packages <https://peps.pyt
133
174
...
134
175
# README for this feature.
135
176
README.rst
136
-
# Setup script for this feature.
137
-
setup.py
138
177
139
178
Contributing a New Feature
140
179
^^^^^^^^^^^^^^^^^^^^^^^^^^
141
180
142
-
You want to contribute a new feature or container? Great! You can do that in six steps as outlined `here <https://github.com/testcontainers/testcontainers-python/blob/main/.github/PULL_REQUEST_TEMPLATE/new_container.md>__`.
181
+
You want to contribute a new feature or container? Great!
182
+
- We recommend you first `open an issue <https://github.com/testcontainers/testcontainers-python/issues/new/choose>`_
183
+
- Then follow the suggestions from the team
184
+
- We also have a Pull Request `template <https://github.com/testcontainers/testcontainers-python/blob/main/.github/PULL_REQUEST_TEMPLATE/new_container.md>`_ for new containers!
0 commit comments