-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
174 lines (158 loc) · 5.51 KB
/
tox.ini
File metadata and controls
174 lines (158 loc) · 5.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# This file provides configurations for tox-based project development and management automation
# tasks.
# Base tox configurations. Note, the 'envlist' runs in the listed order whenever 'tox' is used
# without an -e specifier.
[tox]
requires =
tox>=4,<5
tox-uv>=1,<2
envlist =
uninstall
export
lint
stubs
{py312, py313, py314}-test
coverage
docs
build
install
# This forces tox to create a 'sterile' environment into which the project with all dependencies
# is installed prior to running the requested tasks, isolating the process from the rest of the
# system.
isolated_build = True
# Note: The 'basepython' argument should always be set to the earliest supported python version.
[testenv: lint]
description =
Runs static code formatting, style, and typing checkers. Follows the configuration defined
in the pyproject.toml file.
dependency_groups = dev
basepython = py312
commands =
automation-cli purge-stubs
ruff format
ruff check --fix ./src
mypy ./src
[testenv: stubs]
description =
Generates the py.typed marker and the .pyi stub files using the project's wheel distribution.
depends = lint
dependency_groups = dev
commands =
automation-cli process-typed-markers
stubgen -o stubs --include-private -p ataraxis_data_structures -v
automation-cli process-stubs
ruff format
ruff check --select I --fix ./src
[testenv: {py312, py313, py314}-test]
package = wheel
description =
Runs unit and integration tests for each of the python versions listed in the task name and
aggregates test coverage data. Uses 'loadgroup' balancing and all logical cores to optimize
task runtime speed.
dependency_groups = dev
setenv = COVERAGE_FILE = reports{/}.coverage.{envname}
commands =
pytest --import-mode=append --cov=ataraxis_data_structures --cov-config=pyproject.toml --cov-report=xml \
--junitxml=reports/pytest.xml.{envname} -n logical --dist loadgroup
[testenv:coverage]
skip_install = true
description =
Combines test-coverage data from multiple test runs (for different python versions) into a
single html file. The file can be viewed by loading the 'reports/coverage_html/index.html'.
deps = ataraxis-automation==8.1.0
setenv = COVERAGE_FILE = reports/.coverage
depends = {py312, py313, py314}-test
commands =
junitparser merge --glob reports/pytest.xml.* reports/pytest.xml
coverage combine --keep
coverage xml
coverage html
[testenv:docs]
description =
Builds the API documentation from source code docstrings using Sphinx. The result can be
viewed by loading 'docs/build/html/index.html'.
deps = ataraxis-automation==8.1.0
depends = uninstall
commands =
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html -j auto -v
[testenv:build]
skip_install = true
description =
Builds the project's source code distribution (sdist) and binary distribution (wheel).
deps = ataraxis-automation==8.1.0
allowlist_externals = docker
commands =
python -m build . --sdist
python -m build . --wheel
# Note: use 'tox -e upload --replace-token' command to replace the token stored in the .pypirc
# file before uploading the project.
[testenv:upload]
skip_install = true
description =
Uses twine to upload all files inside the project's 'dist' directory to PyPI.
deps = ataraxis-automation==8.1.0
allowlist_externals = distutils
commands =
automation-cli acquire-pypi-token {posargs:}
twine upload dist/* --skip-existing --config-file .pypirc
[testenv:install]
skip_install = true
deps = ataraxis-automation==8.1.0
depends =
lint
stubs
{py312, py313, py314}-test
coverage
docs
export
description =
Builds and installs the project into its development mamba environment.
commands =
automation-cli install-project --environment-name axds_dev {posargs:}
[testenv:uninstall]
skip_install = true
deps = ataraxis-automation==8.1.0
description =
Uninstalls the project from its development mamba environment.
commands =
automation-cli uninstall-project --environment-name axds_dev
[testenv:create]
skip_install = true
deps = ataraxis-automation==8.1.0
description =
Creates the project's development mamba environment using the requested python version and
installs runtime and development project dependencies extracted from the pyproject.toml file.
commands =
automation-cli create-environment --environment-name axds_dev --python-version 3.14 {posargs:}
[testenv:remove]
skip_install = true
deps = ataraxis-automation==8.1.0
description =
Removes the project's development mamba environment.
commands =
automation-cli remove-environment --environment-name axds_dev
[testenv:provision]
skip_install = true
deps = ataraxis-automation==8.1.0
description =
Provisions the project's development mamba environment by removing and (re)creating the
environment.
commands =
automation-cli provision-environment --environment-name axds_dev --python-version 3.14 {posargs:}
[testenv:export]
skip_install = true
deps = ataraxis-automation==8.1.0
depends = uninstall
description =
Exports the project's development mamba environment to the 'envs' project directory as a
.yml file and as a spec.txt with revision history.
commands =
automation-cli export-environment --environment-name axds_dev
[testenv:import]
skip_install = true
deps = ataraxis-automation==8.1.0
description =
Creates or updates the project's development mamba environment using the .yml file stored
in the 'envs' project directory.
commands =
automation-cli import-environment --environment-name axds_dev