Skip to content

Commit 4fa0749

Browse files
authored
Merge branch 'main' into fix/missing-compose.html
2 parents 1fa62f1 + ff6a32d commit 4fa0749

File tree

201 files changed

+13124
-304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+13124
-304
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "4.9.1"
2+
".": "4.11.0"
33
}

.github/workflows/ci-community.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ jobs:
1919
- name: Checkout contents
2020
uses: actions/checkout@v4
2121
with:
22-
fetch-depth: 0 # recommended by tj-actions/changed-files
22+
fetch-depth: 0
2323
- name: Get changed files
2424
id: changed-files
25-
uses: tj-actions/changed-files@v42
25+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
2626
with:
27-
path: "./modules"
28-
diff_relative: true
29-
dir_names: true
30-
dir_names_exclude_current_dir: true
31-
json: true
27+
base: ${{ github.ref }}
28+
list-files: 'json'
29+
filters: |
30+
modules:
31+
- 'modules/**'
3232
- name: Compute modules from files
3333
id: compute-changes
3434
run: |
35-
modules=$(echo "${{ steps.changed-files.outputs.all_changed_files }}" | jq '.[] | split("/") | first' | jq -s -c '. | unique')
35+
modules=$(echo "${{ toJson(steps.changed-files.outputs.modules_files) }}" | jq '.[] | split("/") | nth(1)' | jq -s -c '. | unique')
3636
echo "computed_modules=$modules"
3737
echo "computed_modules=$modules" >> $GITHUB_OUTPUT
3838
outputs:

.github/workflows/ci-core.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contrinuous Integration for the core package
1+
# Continuous Integration for the core package
22

33
name: core
44

@@ -25,6 +25,8 @@ jobs:
2525
run: poetry install --all-extras
2626
- name: Run twine check
2727
run: poetry build && poetry run twine check dist/*.tar.gz
28+
- name: Set up Docker
29+
uses: docker/setup-docker-action@v4
2830
- name: Run tests
2931
run: make core/tests
3032
- name: Rename coverage file

.github/workflows/ci-lint.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,9 @@ jobs:
2020
- name: Install Python dependencies
2121
run: poetry install --no-interaction
2222
- name: Execute pre-commit handler
23-
run: poetry run pre-commit run -a
23+
run: |
24+
poetry run pre-commit run check-toml
25+
poetry run pre-commit run trailing-whitespace
26+
poetry run pre-commit run end-of-file-fixer
27+
poetry run pre-commit run ruff
28+
poetry run pre-commit run ruff-format

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ venv
7272
.python-version
7373
.env
7474
.github-token
75+
76+
# docs build
77+
site/

.pre-commit-config.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ repos:
1010
- id: end-of-file-fixer
1111

1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: 'v0.3.5'
13+
rev: 'v0.11.5'
1414
hooks:
1515
- id: ruff
1616
# Explicitly setting config to prevent Ruff from using `pyproject.toml` in sub packages.
1717
args: [ '--fix', '--exit-non-zero-on-fix', '--config', 'pyproject.toml' ]
1818
- id: ruff-format
1919
args: [ '--config', 'pyproject.toml' ]
2020

21-
# - repo: local
22-
# hooks:
23-
# - id: mypy
24-
# name: mypy
25-
# entry: poetry run mypy
26-
# args: ["--config-file", "pyproject.toml"]
27-
# files: "core" # start with the core being type checked
28-
# language: system
29-
# types: [ python ]
30-
# require_serial: true
21+
- repo: local
22+
hooks:
23+
- id: mypy
24+
name: mypy
25+
entry: poetry run mypy
26+
args: ["--config-file", "pyproject.toml"]
27+
files: "core" # start with the core being type checked
28+
language: system
29+
types: [ python ]
30+
require_serial: true

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ build:
1414
# https://github.com/readthedocs/readthedocs.org/issues/4912#issuecomment-1143587902s
1515
jobs:
1616
post_install:
17-
- pip install poetry==1.7.1 # match version from poetry.lock
17+
- pip install poetry==2.1.2 # match version from poetry.lock
1818
- poetry config virtualenvs.create false
1919
- poetry install --all-extras

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Changelog
22

3+
## [4.11.0](https://github.com/testcontainers/testcontainers-python/compare/testcontainers-v4.10.0...testcontainers-v4.11.0) (2025-06-15)
4+
5+
6+
### Features
7+
8+
* **core:** Protocol support for container port bind and expose ([#690](https://github.com/testcontainers/testcontainers-python/issues/690)) ([a0d4317](https://github.com/testcontainers/testcontainers-python/commit/a0d4317643005dde4f344eccbfc56c062e83bf05))
9+
* DockerContainer initializer to accept its private members as kwargs ([#809](https://github.com/testcontainers/testcontainers-python/issues/809)) ([e7feb53](https://github.com/testcontainers/testcontainers-python/commit/e7feb53fe532b6d32d5d0c5a5d517249f8e7de50))
10+
11+
12+
### Bug Fixes
13+
14+
* **compose:** use provided docker command instead of default ([#785](https://github.com/testcontainers/testcontainers-python/issues/785)) ([0ae704a](https://github.com/testcontainers/testcontainers-python/commit/0ae704a24de440b715d5f3c11eaa4f18ccd437b5))
15+
* **core:** Add kwargs to image build ([#708](https://github.com/testcontainers/testcontainers-python/issues/708)) ([cc02f94](https://github.com/testcontainers/testcontainers-python/commit/cc02f9444b41efa62836b21210b07aee1da94d0b))
16+
* **core:** change with_command type to include list of strings ([#789](https://github.com/testcontainers/testcontainers-python/issues/789)) ([f7c29cb](https://github.com/testcontainers/testcontainers-python/commit/f7c29cb913e4d42d535783c3aa0f3566d4e543bf))
17+
* **core:** Determine docker socket for rootless docker ([#779](https://github.com/testcontainers/testcontainers-python/issues/779)) ([6817582](https://github.com/testcontainers/testcontainers-python/commit/6817582bf67ed36448b69019ab897c50ae80e7e1))
18+
* **core:** Typing in docker_client ([#702](https://github.com/testcontainers/testcontainers-python/issues/702)) ([e8bf224](https://github.com/testcontainers/testcontainers-python/commit/e8bf2244c7210e31b34e5fecf2602fdd1b8c0834))
19+
* **core:** Typing in generic + network ([#700](https://github.com/testcontainers/testcontainers-python/issues/700)) ([2061912](https://github.com/testcontainers/testcontainers-python/commit/2061912e67705be801136f349f372f542a1f262f))
20+
* **core:** Typing in version ([#701](https://github.com/testcontainers/testcontainers-python/issues/701)) ([9dc2a02](https://github.com/testcontainers/testcontainers-python/commit/9dc2a02ca9b9ffbaacfd7de79ec9f78175758ec0))
21+
* **core:** wait in test core registry ([#812](https://github.com/testcontainers/testcontainers-python/issues/812)) ([b574c0e](https://github.com/testcontainers/testcontainers-python/commit/b574c0e0a11d57c8c56aef448292f8c2fc233078))
22+
* **modules:** fix cosmosdb failure ([#827](https://github.com/testcontainers/testcontainers-python/issues/827)) ([dafcbed](https://github.com/testcontainers/testcontainers-python/commit/dafcbed7608e857bebcdd0b4638bec27abadc693))
23+
* **modules:** update chroma version ([#826](https://github.com/testcontainers/testcontainers-python/issues/826)) ([b7d41dd](https://github.com/testcontainers/testcontainers-python/commit/b7d41ddc5742dd380b6e01c712a02b044a64cbb3))
24+
* **rabbitmq:** correct pika pypi reference ([#817](https://github.com/testcontainers/testcontainers-python/issues/817)) ([e90d308](https://github.com/testcontainers/testcontainers-python/commit/e90d30826fb7d7cf3cc7db39a86465d448aaa6e0))
25+
* **registry:** module typed ([#811](https://github.com/testcontainers/testcontainers-python/issues/811)) ([6b11268](https://github.com/testcontainers/testcontainers-python/commit/6b1126884c82529a93bd55030374d322dd0870bc))
26+
* use connection mode override function in config ([#775](https://github.com/testcontainers/testcontainers-python/issues/775)) ([ab2a1ab](https://github.com/testcontainers/testcontainers-python/commit/ab2a1abd957ffb35719f673a7674df83287f1545)), closes [#774](https://github.com/testcontainers/testcontainers-python/issues/774)
27+
28+
## [4.10.0](https://github.com/testcontainers/testcontainers-python/compare/testcontainers-v4.9.2...testcontainers-v4.10.0) (2025-04-02)
29+
30+
31+
### Features
32+
33+
* Add SocatContainer ([#795](https://github.com/testcontainers/testcontainers-python/issues/795)) ([2f9139c](https://github.com/testcontainers/testcontainers-python/commit/2f9139ca3ea9fba36325373b63635a5f539a3003))
34+
35+
36+
### Bug Fixes
37+
38+
* **ollama:** make device request a list ([#799](https://github.com/testcontainers/testcontainers-python/issues/799)) ([9497a45](https://github.com/testcontainers/testcontainers-python/commit/9497a45c39d13761aa3dd30dd5605676cbbe4b46))
39+
* **security:** Update track-modules job ([#787](https://github.com/testcontainers/testcontainers-python/issues/787)) ([f979525](https://github.com/testcontainers/testcontainers-python/commit/f97952505eba089f9cbbc979f8091dafbf520669))
40+
41+
## [4.9.2](https://github.com/testcontainers/testcontainers-python/compare/testcontainers-v4.9.1...testcontainers-v4.9.2) (2025-02-26)
42+
43+
44+
### Bug Fixes
45+
46+
* Change env var disabling OpenSearch security plugin ([#773](https://github.com/testcontainers/testcontainers-python/issues/773)) ([2620d7f](https://github.com/testcontainers/testcontainers-python/commit/2620d7fb1157caa18c3bef4bf2f9b3b79cd2f075))
47+
* **core:** create_label test ([#771](https://github.com/testcontainers/testcontainers-python/issues/771)) ([7517297](https://github.com/testcontainers/testcontainers-python/commit/751729722a013b46f67c09b4318b1b3d92b98008))
48+
* **core:** multiple container start invocations with custom labels ([#769](https://github.com/testcontainers/testcontainers-python/issues/769)) ([3e783a8](https://github.com/testcontainers/testcontainers-python/commit/3e783a80aa11b9c87201404a895d922624f0d451))
49+
* **keycloak:** Fixed Keycloak testcontainer for latest version v26.1.0 ([#766](https://github.com/testcontainers/testcontainers-python/issues/766)) ([b1642e9](https://github.com/testcontainers/testcontainers-python/commit/b1642e98c4d349564c4365782d1b58c9810b719a))
50+
* **scylla:** scylla get cluster method ([#778](https://github.com/testcontainers/testcontainers-python/issues/778)) ([46913c1](https://github.com/testcontainers/testcontainers-python/commit/46913c18a8b6f37bf8dc193828148926b6fc56a8))
51+
52+
53+
### Documentation
54+
55+
* Fixed typo in CONTRIBUTING.md ([#767](https://github.com/testcontainers/testcontainers-python/issues/767)) ([f0bb0f5](https://github.com/testcontainers/testcontainers-python/commit/f0bb0f54bea83885698bd137e24c397498709362))
56+
357
## [4.9.1](https://github.com/testcontainers/testcontainers-python/compare/testcontainers-v4.9.0...testcontainers-v4.9.1) (2025-01-21)
458

559

Dockerfile.docs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM python:3.11-slim
2+
3+
RUN pip install poetry
4+
5+
WORKDIR /docs

Makefile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ coverage: ## Target to combine and report coverage.
3131
lint: ## Lint all files in the project, which we also run in pre-commit
3232
poetry run pre-commit run -a
3333

34+
mypy-core-report:
35+
poetry run mypy --config-file pyproject.toml core | poetry run python scripts/mypy_report.py
36+
3437
docs: ## Build the docs for the project
3538
poetry run sphinx-build -nW . docs/_build
3639

@@ -65,3 +68,39 @@ clean-all: clean ## Remove all generated files and reset the local virtual envir
6568
.PHONY: help
6669
help: ## Display command usage
6770
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
71+
72+
## --------------------------------------
73+
74+
DOCS_CONTAINER=mkdocs-container
75+
DOCS_IMAGE=mkdocs-poetry
76+
DOCS_DOCKERFILE := Dockerfile.docs
77+
78+
.PHONY: clean-docs
79+
clean-docs:
80+
@echo "Destroying docs"
81+
@if docker ps -a --format '{{.Names}}' | grep -q '^$(DOCS_CONTAINER)$$'; then \
82+
docker rm -f $(DOCS_CONTAINER); \
83+
fi
84+
@if docker images -q $(DOCS_IMAGE) | grep -q .; then \
85+
docker rmi $(DOCS_IMAGE); \
86+
fi
87+
88+
.PHONY: docs-ensure-image
89+
docs-ensure-image:
90+
@if [ -z "$$(docker images -q $(DOCS_IMAGE))" ]; then \
91+
docker build -f $(DOCS_DOCKERFILE) -t $(DOCS_IMAGE) . ; \
92+
fi
93+
94+
.PHONY: serve-docs
95+
serve-docs: docs-ensure-image
96+
docker run --rm --name $(DOCS_CONTAINER) -it -p 8000:8000 \
97+
-v $(PWD):/testcontainers-go \
98+
-w /testcontainers-go \
99+
$(DOCS_IMAGE) bash -c "\
100+
cd docs && poetry install --no-root && \
101+
poetry run mkdocs serve -f ../mkdocs.yml -a 0.0.0.0:8000"
102+
103+
# Needed if dependencies are added to the docs site
104+
.PHONY: export-docs-deps
105+
export-docs-deps:
106+
cd docs && poetry export --without-hashes --output requirements.txt

0 commit comments

Comments
 (0)