pytest-xdocker 0.2.7__tar.gz → 0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. pytest_xdocker-0.2.9/.editorconfig +21 -0
  2. pytest_xdocker-0.2.9/.gitattributes +31 -0
  3. pytest_xdocker-0.2.9/.github/CODEOWNERS +2 -0
  4. pytest_xdocker-0.2.9/.github/actions/setup-uv-env/action.yml +50 -0
  5. pytest_xdocker-0.2.9/.github/workflows/publish.yml +57 -0
  6. pytest_xdocker-0.2.9/.github/workflows/test.yml +93 -0
  7. pytest_xdocker-0.2.9/.gitignore +183 -0
  8. pytest_xdocker-0.2.9/.venv.pth +4 -0
  9. pytest_xdocker-0.2.9/.vscode/extensions.json +9 -0
  10. pytest_xdocker-0.2.9/.vscode/launch.json +16 -0
  11. pytest_xdocker-0.2.9/.vscode/settings.json +18 -0
  12. pytest_xdocker-0.2.9/CHANGES.rst +99 -0
  13. pytest_xdocker-0.2.9/CONTRIBUTING.rst +188 -0
  14. pytest_xdocker-0.2.9/Makefile +49 -0
  15. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/PKG-INFO +23 -19
  16. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/README.rst +1 -1
  17. pytest_xdocker-0.2.9/STYLE_GUIDE.rst +44 -0
  18. pytest_xdocker-0.2.9/docs/changes.rst +4 -0
  19. pytest_xdocker-0.2.9/docs/conf.py +30 -0
  20. pytest_xdocker-0.2.9/docs/contributing.rst +1 -0
  21. pytest_xdocker-0.2.9/docs/index.rst +36 -0
  22. pytest_xdocker-0.2.9/docs/license.rst +11 -0
  23. pytest_xdocker-0.2.9/docs/modules.rst +7 -0
  24. pytest_xdocker-0.2.9/docs/pytest_xdocker.rst +93 -0
  25. pytest_xdocker-0.2.9/docs/style_guide.rst +1 -0
  26. pytest_xdocker-0.2.9/environment.yml +2 -0
  27. pytest_xdocker-0.2.9/poetry.toml +2 -0
  28. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pyproject.toml +30 -35
  29. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/cache.py +4 -4
  30. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/process.py +1 -4
  31. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/xdocker.py +36 -12
  32. pytest_xdocker-0.2.9/setup.py +6 -0
  33. pytest_xdocker-0.2.9/tests/integration/__init__.py +0 -0
  34. pytest_xdocker-0.2.9/tests/integration/test_process.py +50 -0
  35. pytest_xdocker-0.2.9/tests/integration/test_xdocker.py +109 -0
  36. pytest_xdocker-0.2.9/tests/unit/__init__.py +0 -0
  37. pytest_xdocker-0.2.9/tests/unit/test_cache.py +46 -0
  38. pytest_xdocker-0.2.9/tests/unit/test_command.py +236 -0
  39. pytest_xdocker-0.2.9/tests/unit/test_docker.py +755 -0
  40. pytest_xdocker-0.2.9/tests/unit/test_fixtures.py +8 -0
  41. pytest_xdocker-0.2.9/tests/unit/test_lock.py +73 -0
  42. pytest_xdocker-0.2.9/tests/unit/test_network.py +8 -0
  43. pytest_xdocker-0.2.9/tests/unit/test_process.py +69 -0
  44. pytest_xdocker-0.2.9/tests/unit/test_retry.py +157 -0
  45. pytest_xdocker-0.2.9/tests/unit/test_validators.py +25 -0
  46. pytest_xdocker-0.2.9/tests/unit/test_xdocker.py +147 -0
  47. pytest_xdocker-0.2.9/uv.lock +1225 -0
  48. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/LICENSE.rst +0 -0
  49. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/__init__.py +0 -0
  50. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/command.py +0 -0
  51. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/docker.py +0 -0
  52. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/fixtures.py +0 -0
  53. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/lock.py +0 -0
  54. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/network.py +0 -0
  55. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/retry.py +0 -0
  56. {pytest_xdocker-0.2.7 → pytest_xdocker-0.2.9}/pytest_xdocker/validators.py +0 -0
@@ -0,0 +1,21 @@
1
+ # EditorConfig is awesome: http://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ # Unix-style newlines with a newline ending every file
7
+ [*]
8
+ charset = utf-8
9
+ end_of_line = lf
10
+ indent_size = 4
11
+ indent_style = space
12
+ insert_final_newline = true
13
+ trim_trailing_whitespace = true
14
+
15
+ # 2 space indentation
16
+ [*.{yml,yaml,json,js,css,html}]
17
+ indent_size = 2
18
+
19
+ # Tab indentation (no size specified)
20
+ [Makefile]
21
+ indent_style = tab
@@ -0,0 +1,31 @@
1
+ # Auto detect text files and perform LF normalization.
2
+ * text=auto
3
+
4
+ # Python files
5
+ *.py text diff=python
6
+ poetry.lock linguist-generated=true
7
+
8
+ # Jupyter notebooks
9
+ *.ipynb text eol=lf
10
+
11
+ # Documents
12
+ *.csv text
13
+ *.md text diff=markdown
14
+ *.rst text
15
+ *.txt text
16
+
17
+ # Git files
18
+ *.gitattributes text
19
+ .gitignore text
20
+
21
+ # Serialisation
22
+ *.json text
23
+ *.toml text
24
+ *.xml text
25
+ *.yaml text
26
+ *.yml text
27
+
28
+ # Exclude files from exporting
29
+ .gitattributes export-ignore
30
+ .gitignore export-ignore
31
+ .gitkeep export-ignore
@@ -0,0 +1,2 @@
1
+ # These owners will be the default owners for everything in the repo.
2
+ * @cr3
@@ -0,0 +1,50 @@
1
+ name: "setup-uv-env"
2
+ description: "Composite action to setup the Python and uv virtual environment."
3
+
4
+ inputs:
5
+ python-version:
6
+ required: false
7
+ description: "Python version to use"
8
+ default: "3.10"
9
+ uv-version:
10
+ required: false
11
+ description: "uv version to use (empty = use required-version or latest)"
12
+ default: ""
13
+ extras:
14
+ required: false
15
+ description: "Include optional dependencies"
16
+ default: ""
17
+ working-directory:
18
+ required: false
19
+ description: "Working directory"
20
+ default: "."
21
+
22
+ runs:
23
+ using: "composite"
24
+ steps:
25
+ - name: Set up python
26
+ uses: actions/setup-python@v6
27
+ with:
28
+ python-version: ${{ inputs.python-version }}
29
+
30
+ - name: Install uv
31
+ uses: astral-sh/setup-uv@v7
32
+ with:
33
+ version: ${{ inputs.uv-version }}
34
+ python-version: ${{ inputs.python-version }}
35
+ working-directory: ${{ inputs.working-directory }}
36
+ enable-cache: true
37
+
38
+ - name: Install dependencies
39
+ shell: bash
40
+ working-directory: ${{ inputs.working-directory }}
41
+ run: |
42
+ EXTRA_ARGS=()
43
+ if [ -n "${{ inputs.extras }}" ]; then
44
+ IFS=',' read -ra EXTRAS <<< "${{ inputs.extras }}"
45
+ for e in "${EXTRAS[@]}"; do
46
+ e="$(echo "$e" | xargs)" # trim
47
+ [ -n "$e" ] && EXTRA_ARGS+=(--extra "$e")
48
+ done
49
+ fi
50
+ uv sync "${EXTRA_ARGS[@]}"
@@ -0,0 +1,57 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ branches: [main]
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ publish:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Check out
16
+ uses: actions/checkout@v6
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Build
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ python -m pip install build
24
+ python -m build
25
+
26
+ - name: Publish
27
+ uses: pypa/gh-action-pypi-publish@release/v1
28
+ with:
29
+ user: __token__
30
+ password: ${{ secrets.PYPI_TOKEN }}
31
+
32
+ docs:
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - name: Check out
36
+ uses: actions/checkout@v6
37
+
38
+ - name: Set up the environment
39
+ uses: ./.github/actions/setup-uv-env
40
+ with:
41
+ extras: docs
42
+
43
+ - name: Export tag
44
+ id: vars
45
+ run: echo tag=${GITHUB_REF#refs/*/} >> $GITHUB_OUTPUT
46
+
47
+ - name: Run docs target
48
+ env:
49
+ RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
50
+ run: |
51
+ make docs
52
+ touch build/html/.nojekyll
53
+
54
+ - name: Deploy
55
+ uses: JamesIves/github-pages-deploy-action@v4
56
+ with:
57
+ folder: build/html
@@ -0,0 +1,93 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ types: [opened, synchronize, reopened]
8
+
9
+ jobs:
10
+ check:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Check out
14
+ uses: actions/checkout@v6
15
+
16
+ - name: Set up (uv)
17
+ uses: ./.github/actions/setup-uv-env
18
+ with:
19
+ extras: check
20
+
21
+ - name: Run check target
22
+ run: make check
23
+
24
+ test:
25
+ runs-on: ubuntu-latest
26
+ strategy:
27
+ fail-fast: false
28
+ matrix:
29
+ python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
30
+ steps:
31
+ - name: Check out
32
+ uses: actions/checkout@v6
33
+
34
+ - name: Set up the environment
35
+ uses: ./.github/actions/setup-uv-env
36
+ with:
37
+ python-version: ${{ matrix.python-version }}
38
+ extras: test
39
+
40
+ - name: Run test target
41
+ run: make test
42
+
43
+ - name: "Upload coverage data"
44
+ uses: actions/upload-artifact@v7
45
+ with:
46
+ name: coverage-data-${{ matrix.python-version }}
47
+ path: .coverage.*
48
+ if-no-files-found: ignore
49
+ include-hidden-files: true
50
+
51
+ coverage:
52
+ runs-on: ubuntu-latest
53
+ needs: test
54
+
55
+ steps:
56
+ - name: Check out
57
+ uses: actions/checkout@v6
58
+
59
+ - name: Set up the environment
60
+ uses: ./.github/actions/setup-uv-env
61
+ with:
62
+ python-version: "3.14"
63
+ extras: test
64
+
65
+ - name: Download coverage data
66
+ uses: actions/download-artifact@v8
67
+ with:
68
+ pattern: coverage-data-*
69
+ merge-multiple: true
70
+
71
+ - name: Run coverage target
72
+ run: make coverage
73
+
74
+ - name: Upload HTML report if check failed.
75
+ uses: actions/upload-artifact@v7
76
+ with:
77
+ name: html-report
78
+ path: htmlcov
79
+ if: ${{ failure() }}
80
+
81
+ docs:
82
+ runs-on: ubuntu-latest
83
+ steps:
84
+ - name: Check out
85
+ uses: actions/checkout@v6
86
+
87
+ - name: Set up the environment
88
+ uses: ./.github/actions/setup-uv-env
89
+ with:
90
+ extras: docs
91
+
92
+ - name: Run docs target
93
+ run: make docs
@@ -0,0 +1,183 @@
1
+ # pytest-xprocess cache
2
+ .xprocess/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py,cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ #Pipfile.lock
99
+
100
+ # poetry
101
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105
+ #poetry.lock
106
+
107
+ # pdm
108
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109
+ #pdm.lock
110
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111
+ # in version control.
112
+ # https://pdm.fming.dev/#use-with-ide
113
+ .pdm.toml
114
+
115
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116
+ __pypackages__/
117
+
118
+ # Celery stuff
119
+ celerybeat-schedule
120
+ celerybeat.pid
121
+
122
+ # SageMath parsed files
123
+ *.sage.py
124
+
125
+ # Environments
126
+ .env
127
+ .venv
128
+ env/
129
+ venv/
130
+ ENV/
131
+ env.bak/
132
+ venv.bak/
133
+
134
+ # Spyder project settings
135
+ .spyderproject
136
+ .spyproject
137
+
138
+ # Rope project settings
139
+ .ropeproject
140
+
141
+ # mkdocs documentation
142
+ /site
143
+
144
+ # mypy
145
+ .mypy_cache/
146
+ .dmypy.json
147
+ dmypy.json
148
+
149
+ # Pyre type checker
150
+ .pyre/
151
+
152
+ # pytype static type analyzer
153
+ .pytype/
154
+
155
+ # Cython debug symbols
156
+ cython_debug/
157
+
158
+ # PyCharm
159
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
162
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
+ #.idea/
164
+
165
+ # Swap
166
+ [._]*.s[a-v][a-z]
167
+ !*.svg # comment out if you don't need vector files
168
+ [._]*.sw[a-p]
169
+ [._]s[a-rt-v][a-z]
170
+ [._]ss[a-gi-z]
171
+ [._]sw[a-p]
172
+
173
+ # Session
174
+ Session.vim
175
+ Sessionx.vim
176
+
177
+ # Temporary
178
+ .netrwhist
179
+ *~
180
+ # Auto-generated tag files
181
+ tags
182
+ # Persistent undo
183
+ [._]*.un~
@@ -0,0 +1,4 @@
1
+ # site-packages is not included by the conda .venv/python.exe
2
+ # but it is included by the virtualenv .venv/Scripts/python.exe
3
+ # so it is forced here to use both interpreters interchangeably.
4
+ .venv\Lib\site-packages
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ "charliermarsh.ruff",
4
+ "ms-python.black-formatter",
5
+ "lextudio.restructuredtext",
6
+ "trond-snekvik.simple-rst",
7
+ "editorconfig.editorconfig"
8
+ ]
9
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Python: Current File",
9
+ "type": "python",
10
+ "request": "test",
11
+ "program": "${file}",
12
+ "console": "integratedTerminal",
13
+ "justMyCode": false
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "files.insertFinalNewline": true,
3
+ "python.formatting.provider": "none",
4
+ "python.testing.pytestArgs": [
5
+ "tests"
6
+ ],
7
+ "python.testing.unittestEnabled": false,
8
+ "python.testing.pytestEnabled": true,
9
+ "terminal.integrated.defaultProfile.windows": "Windows PowerShell",
10
+ "[python]": {
11
+ "editor.formatOnSave": true,
12
+ "editor.codeActionsOnSave": {
13
+ "source.fixAll": true
14
+ },
15
+ "editor.defaultFormatter": "ms-python.black-formatter"
16
+ },
17
+ "esbonio.sphinx.confDir": ""
18
+ }
@@ -0,0 +1,99 @@
1
+ Version 0.2.9
2
+ -------------
3
+
4
+ Released 2025-05-20
5
+
6
+ - Add docker up.
7
+
8
+ Version 0.2.8
9
+ -------------
10
+
11
+ Released 2025-03-27
12
+
13
+ - Replace poetry with uv
14
+
15
+ Version 0.2.7
16
+ -------------
17
+
18
+ Released 2025-12-08
19
+
20
+ - Bump pytest to 9.0.0
21
+
22
+ Version 0.2.6
23
+ -------------
24
+
25
+ Released 2025-12-04
26
+
27
+ - Replace netifaces with netifaces2
28
+
29
+ Version 0.2.5
30
+ -------------
31
+
32
+ Released 2025-06-10
33
+
34
+ - Bump pytest to 8.0.0
35
+
36
+ Version 0.2.4
37
+ -------------
38
+
39
+ Released 2025-03-23
40
+
41
+ - Bump attrs to 25.3.0
42
+
43
+ Version 0.2.3
44
+ -------------
45
+
46
+ Released 2025-03-07
47
+
48
+ - Fix --file docker compose option.
49
+ - Fix docker command unit test.
50
+
51
+ Version 0.2.2
52
+ -------------
53
+
54
+ Released 2025-03-07
55
+
56
+ - Add --file docker compose option.
57
+
58
+ Version 0.2.1
59
+ -------------
60
+
61
+ Released 2025-01-22
62
+
63
+ - Add --env-file docker compose option.
64
+
65
+ Version 0.2.0
66
+ -------------
67
+
68
+ Released 2025-01-22
69
+
70
+ - Replace docker-xrun with xdocker for compose.
71
+ - Add --env-file docker [compose] run option.
72
+
73
+ Version 0.1.3
74
+ -------------
75
+
76
+ Released 2025-01-14
77
+
78
+ - Add timeout to process data.
79
+
80
+ Version 0.1.2
81
+ -------------
82
+
83
+ Released 2025-01-12
84
+
85
+ - Add docker compose run command.
86
+
87
+ Version 0.1.1
88
+ -------------
89
+
90
+ Released 2025-01-12
91
+
92
+ - Add docker compose command.
93
+
94
+ Version 0.1.0
95
+ -------------
96
+
97
+ Released 2025-01-03
98
+
99
+ - Initial release.