Skip to content

Commit 030d442

Browse files
committed
Merge branch 'main' into no-ticket/start-return-hint-Self
2 parents 7fa3ac5 + ba42586 commit 030d442

444 files changed

Lines changed: 2237 additions & 1572 deletions

File tree

Some content is hidden

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

‎.github/CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion

‎.github/PULL_REQUEST_TEMPLATE/new_container.md‎

Lines changed: 4 additions & 8 deletions

‎.github/workflows/ci-community.yml‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ on:
1010
push:
1111
branches: [ main ]
1212
paths:
13-
- "modules/**"
13+
- "src/testcontainers/community/**"
14+
- "tests/community/**"
1415
pull_request:
1516
branches: [ main ]
1617
paths:
17-
- "modules/**"
18+
- "src/testcontainers/community/**"
19+
- "tests/community/**"
1820

1921
jobs:
2022
track-modules:
@@ -32,15 +34,14 @@ jobs:
3234
list-files: 'json'
3335
filters: |
3436
modules:
35-
- 'modules/**'
37+
- '**'
3638
- name: Compute modules from files
3739
id: compute-changes
3840
run: |
39-
modules=$(echo "${{ toJson(steps.changed-files.outputs.modules_files) }}" | jq '.[] | split("/") | nth(1)' | jq -s -c '. | unique')
40-
echo "computed_modules=$modules"
41-
echo "computed_modules=$modules" >> $GITHUB_OUTPUT
41+
python3 scripts/compute_modules.py '${{ steps.changed-files.outputs.modules_files }}'
4242
outputs:
4343
changed_modules: ${{ steps.compute-changes.outputs.computed_modules }}
44+
4445
test:
4546
runs-on: ubuntu-22.04
4647
needs: [track-modules]
@@ -60,6 +61,6 @@ jobs:
6061
- name: Install Python dependencies
6162
run: uv sync --extra ${{ matrix.module }}
6263
- name: Run tests
63-
run: make modules/${{ matrix.module }}/tests
64+
run: make community/${{ matrix.module }}/tests
6465
- name: Run doctests
65-
run: make modules/${{ matrix.module }}/doctests
66+
run: make community/${{ matrix.module }}/doctests

‎.github/workflows/ci-lint.yml‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,4 @@ jobs:
2222
- name: Execute pre-commit handler
2323
continue-on-error: true
2424
run: |
25-
uv run pre-commit run check-toml
26-
uv run pre-commit run trailing-whitespace
27-
uv run pre-commit run end-of-file-fixer
28-
uv run pre-commit run ruff
29-
uv run pre-commit run ruff-format
30-
- name: Execute mypy
31-
run: |
32-
make mypy-core-report
33-
make mypy-core
25+
uv run pre-commit run --all-files

‎.readthedocs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
version: 2
55

66
sphinx:
7-
configuration: conf.py
7+
configuration: docs/conf.py
88

99
build:
1010
os: ubuntu-24.04

‎Makefile‎

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33

44
PYTHON_VERSION ?= 3.10
55
IMAGE = testcontainers-python:${PYTHON_VERSION}
6-
PACKAGES = core $(addprefix modules/,$(notdir $(wildcard modules/*)))
76

8-
UPLOAD = $(addsuffix /upload,${PACKAGES})
9-
TESTS = $(addsuffix /tests,$(filter-out meta,${PACKAGES}))
10-
TESTS_DIND = $(addsuffix -dind,${TESTS})
11-
DOCTESTS = $(addsuffix /doctests,$(filter-out modules/README.md,${PACKAGES}))
7+
COMMUNITY_MODULES = $(patsubst tests/community/%/,%,$(wildcard tests/community/*/))
8+
COMMUNITY_TESTS = $(addprefix community/,$(addsuffix /tests,$(COMMUNITY_MODULES)))
9+
COMMUNITY_DOCTESTS = $(addprefix community/,$(addsuffix /doctests,$(COMMUNITY_MODULES)))
1210

1311

1412
install: ## Set up the project for development
@@ -18,15 +16,17 @@ install: ## Set up the project for development
1816
build: ## Build the python package
1917
uv build && uv run twine check dist/*
2018

21-
tests: ${TESTS} ## Run tests for each package
22-
${TESTS}: %/tests:
23-
uv run coverage run --parallel -m pytest -v $*/tests
19+
tests: core/tests community-tests ## Run all tests
2420

25-
quick-core-tests: ## Run core tests excluding long_running
26-
uv run coverage run --parallel -m pytest -v -m "not long_running" core/tests
21+
core/tests: ## Run tests for the core package
22+
uv run coverage run --parallel -m pytest -v tests/core
23+
24+
community-tests: $(COMMUNITY_TESTS) ## Run tests for all community modules
25+
$(COMMUNITY_TESTS): community/%/tests:
26+
uv run coverage run --parallel -m pytest -v tests/community/$*
2727

28-
core-tests: ## Run tests for the core package
29-
uv run coverage run --parallel -m pytest -v core/tests
28+
quick-core-tests: ## Run core tests excluding long_running
29+
uv run coverage run --parallel -m pytest -v -m "not long_running" tests/core
3030

3131
coverage: ## Target to combine and report coverage.
3232
uv run coverage combine
@@ -37,24 +37,21 @@ coverage: ## Target to combine and report coverage.
3737
lint: ## Lint all files in the project, which we also run in pre-commit
3838
uv run pre-commit run --all-files
3939

40-
mypy-core: ## Run mypy on the core package
41-
uv run mypy --config-file pyproject.toml core
42-
43-
mypy-core-report: ## Generate a report for mypy on the core package
44-
uv run mypy --config-file pyproject.toml core | uv run python scripts/mypy_report.py
45-
4640
docs: ## Build the docs for the project
47-
uv run --all-extras sphinx-build -nW . docs/_build
41+
uv run --all-extras sphinx-build -nW docs docs/_build
4842

4943
# Target to build docs watching for changes as per https://stackoverflow.com/a/21389615
50-
docs-watch :
51-
uv run sphinx-autobuild . docs/_build # requires 'pip install sphinx-autobuild'
44+
docs-watch:
45+
uv run sphinx-autobuild docs docs/_build # requires 'pip install sphinx-autobuild'
46+
47+
doctests: core/doctests community-doctests ## Run doctests found across the documentation.
5248

53-
doctests: ${DOCTESTS} ## Run doctests found across the documentation.
54-
uv run --all-extras sphinx-build -b doctest . docs/_build
49+
core/doctests: ## Run doctests for the core package
50+
uv run --all-extras sphinx-build -b doctest -c doctests docs/core docs/_build
5551

56-
${DOCTESTS}: %/doctests: ## Run doctests found for a module.
57-
uv run --all-extras sphinx-build -b doctest -c doctests $* docs/_build
52+
community-doctests: $(COMMUNITY_DOCTESTS) ## Run doctests for all community modules
53+
$(COMMUNITY_DOCTESTS): community/%/doctests:
54+
uv run --all-extras sphinx-build -b doctest docs docs/_build docs/community/$*.rst
5855

5956

6057
clean: ## Remove generated files.
@@ -67,7 +64,9 @@ clean-all: clean ## Remove all generated files and reset the local virtual envir
6764
rm -rf .venv
6865

6966
# Targets that do not generate file-level artifacts.
70-
.PHONY: clean docs doctests image tests quick-core-tests ${TESTS}
67+
.PHONY: clean docs doctests core/doctests community-doctests $(COMMUNITY_DOCTESTS) \
68+
tests core/tests community-tests $(COMMUNITY_TESTS) \
69+
quick-core-tests install build coverage lint mypy-core mypy-core-report docs-watch
7170

7271

7372
# Implements this pattern for autodocumenting Makefiles:

‎core/tests/test_project_settings.py‎

Lines changed: 0 additions & 37 deletions
This file was deleted.

‎docs/community/arangodb.rst‎

Lines changed: 2 additions & 0 deletions
Lines changed: 2 additions & 2 deletions

‎docs/community/azurite.rst‎

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)