-
Notifications
You must be signed in to change notification settings - Fork 33
/
tox.ini
306 lines (275 loc) · 15.1 KB
/
tox.ini
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# This Software (Dioptra) is being made available as a public service by the
# National Institute of Standards and Technology (NIST), an Agency of the United
# States Department of Commerce. This software was developed in part by employees of
# NIST and in part by NIST contractors. Copyright in portions of this software that
# were developed by NIST contractors has been licensed or assigned to NIST. Pursuant
# to Title 17 United States Code Section 105, works of NIST employees are not
# subject to copyright protection in the United States. However, NIST may hold
# international copyright in software created by its employees and domestic
# copyright (or licensing rights) in portions of software that were assigned or
# licensed to NIST. To the extent that NIST holds copyright in this software, it is
# being made available under the Creative Commons Attribution 4.0 International
# license (CC BY 4.0). The disclaimers of the CC BY 4.0 license apply to all parts
# of the software developed or licensed by NIST.
#
# ACCESS THE FULL CC BY 4.0 LICENSE HERE:
# https://creativecommons.org/licenses/by/4.0/legalcode
[tox]
min_version = 4
requires =
tox>4
env_list =
clean
py{311}-pytest
report
py{311}-cookiecutter
black
isort
flake8
mypy
gitlint
skip_missing_interpreters = True
[coverage]
deps =
coverage[toml]
[gitlint]
deps =
gitlint
[pytest]
deps =
pytest>=7
[pytest-cov]
deps =
{[pytest]deps}
{[coverage]deps}
Faker>=24.0.0
freezegun
pytest-cov
pytest-datadir
commands = python -m pytest --cov=dioptra.pyplugs --cov=dioptra.restapi --cov=dioptra.rq --cov=dioptra.task_engine --cov=dioptra.worker --cov-append --cov-report=term-missing {posargs}
[sphinx]
deps =
Sphinx>=4.5.0,<5
[testenv]
platform =
linux: linux
macos: darwin
win: win32
extras =
mlflow-full
worker
[testenv:py{311}-pytest]
deps =
{[pytest]deps}
Faker>=24.0.0
freezegun
pytest-datadir
skip_install = false
commands = python -m pytest {posargs}
[testenv:py{311}-pytest-cov]
deps =
{[pytest-cov]deps}
skip_install = false
commands = {[pytest-cov]commands}
depends =
py{311}: clean
[testenv:py{311}-cookiecutter]
deps =
{[pytest]deps}
binaryornot>=0.4.0
cookiecutter>=2.0.0,<2.2.0
pytest-cookies
skip_install = true
commands = python -m pytest {posargs:--template="{tox_root}{/}cookiecutter-templates{/}cookiecutter-dioptra-deployment" "{tox_root}{/}tests{/}cookiecutter_dioptra_deployment"}
[testenv:black]
deps =
black>=22
skip_install = true
commands = black --config "{tox_root}{/}pyproject.toml" {posargs:--check --diff "{tox_root}{/}src{/}dioptra" "{tox_root}{/}task-plugins{/}dioptra_builtins"}
[testenv:bumpver]
deps =
bumpver
skip_install = true
commands = bumpver {posargs:update --dry}
[testenv:changelog]
deps =
commitizen
skip_install = true
commands = cz changelog --unreleased-version {posargs}
[testenv:clean]
deps =
{[coverage]deps}
skip_install = true
commands = coverage erase
[testenv:docs]
description = build documentation
deps =
{[sphinx]deps}
Markdown>=3.4.0
mistune<2
plantuml-markdown
pydata-sphinx-theme>=0.13.3
pymdown-extensions>=9.4
recommonmark>=0.7.1
sphinx-autobuild
sphinx-autodoc-typehints
sphinx-book-theme>=0.3.3
sphinx-copybutton>=0.5.0
sphinx-design>=0.1.0
sphinx-togglebutton>=0.3.2
sphinxcontrib-applehelp<=1.0.4
sphinxcontrib-devhelp<=1.0.2
sphinxcontrib-htmlhelp<=2.0.1
sphinxcontrib-openapi
sphinxcontrib-qthelp<=1.0.3
sphinxcontrib-serializinghtml<=1.1.5
typing-extensions>=3.7.4.0
skip_install = false
commands_pre = python -c 'import shutil;shutil.rmtree("{tox_root}{/}docs{/}build", ignore_errors=True)'
commands = python -m sphinx.cmd.build {posargs:-b "html" "{tox_root}{/}docs{/}source" "{tox_root}{/}docs{/}build"}
depends =
web-compile
[testenv:doc8]
deps =
{[sphinx]deps}
doc8
tomli
skip_install = true
commands = doc8 --config "{tox_root}{/}pyproject.toml" {posargs:"{tox_root}{/}docs{/}source"}
[testenv:flake8]
deps =
flake8>=3.8.0
flake8-bugbear
mccabe
pycodestyle
pyflakes
skip_install = true
commands = flake8 {posargs:"{tox_root}{/}src{/}dioptra" "{tox_root}{/}task-plugins{/}dioptra_builtins"}
[testenv:gitlint]
deps =
{[gitlint]deps}
skip_install = true
commands = gitlint {posargs:--config "{tox_root}{/}.gitlint"}
[testenv:isort]
deps =
isort>=5.6.0
skip_install = true
commands = isort {posargs:-c -v "{tox_root}{/}src{/}dioptra" "{tox_root}{/}task-plugins{/}dioptra_builtins"}
[testenv:mypy]
deps =
mypy[reports]>=0.920
mypy_extensions
types-cryptography
types-freezegun
types-jsonschema
types-mypy-extensions
types-python-dateutil
types-PyYAML
types-redis
types-requests
typing-extensions>=3.7.4.3
skip_install = false
commands = mypy {posargs:"{tox_root}{/}src{/}dioptra" "{tox_root}{/}task-plugins{/}dioptra_builtins"}
[testenv:report]
deps =
{[coverage]deps}
skip_install = true
commands =
coverage report
coverage {posargs:html -d coverage}
depends =
py{311}-pytest-cov
[testenv:py311-{win,macos,linux}-{x86_64,aarch64}-requirements-dev]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-win-x86_64: pip-compile --output-file "venvs{/}win-amd64-py3.11-requirements-dev.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in
py311-win-aarch64: pip-compile --output-file "venvs{/}win-arm64-py3.11-requirements-dev.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in
py311-macos-x86_64: pip-compile --output-file "venvs{/}macos-amd64-py3.11-requirements-dev.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in
py311-macos-aarch64: pip-compile --output-file "venvs{/}macos-arm64-py3.11-requirements-dev.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-requirements-dev.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-requirements-dev.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in
[testenv:py311-{win,macos,linux}-{x86_64,aarch64}-requirements-dev-pytorch]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-win-x86_64: pip-compile --output-file "venvs{/}win-amd64-py3.11-requirements-dev-pytorch.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-pytorch.in
py311-win-aarch64: pip-compile --output-file "venvs{/}win-arm64-py3.11-requirements-dev-pytorch.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-pytorch.in
py311-macos-x86_64: pip-compile --output-file "venvs{/}macos-amd64-py3.11-requirements-dev-pytorch.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-pytorch.in
py311-macos-aarch64: pip-compile --output-file "venvs{/}macos-arm64-py3.11-requirements-dev-pytorch.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-pytorch.in
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-requirements-dev-pytorch.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-pytorch.in
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-requirements-dev-pytorch.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-pytorch.in
[testenv:py311-{win,macos,linux}-{x86_64,aarch64}-requirements-dev-tensorflow]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-win-x86_64: pip-compile --output-file "venvs{/}win-amd64-py3.11-requirements-dev-tensorflow.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-tensorflow.in
py311-win-aarch64: pip-compile --output-file "venvs{/}win-arm64-py3.11-requirements-dev-tensorflow.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-tensorflow.in
py311-macos-x86_64: pip-compile --output-file "venvs{/}macos-amd64-py3.11-requirements-dev-tensorflow.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-tensorflow.in
py311-macos-aarch64: pip-compile --output-file "venvs{/}macos-arm64-py3.11-requirements-dev-tensorflow.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-tensorflow.in
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-requirements-dev-tensorflow.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-tensorflow.in
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-requirements-dev-tensorflow.txt" --resolver=backtracking --extra dev --extra examples --extra mlflow-full --extra postgres --extra worker --extra cookiecutter --upgrade --verbose "pyproject.toml" requirements-dev.in requirements-dev-tensorflow.in
[testenv:py311-linux-{x86_64,aarch64}-mlflow-tracking-requirements]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-mlflow-tracking-requirements.txt" --resolver=backtracking --upgrade --verbose "docker{/}pip-tools{/}mlflow-tracking-requirements.in"
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-mlflow-tracking-requirements.txt" --resolver=backtracking --upgrade --verbose "docker{/}pip-tools{/}mlflow-tracking-requirements.in"
[testenv:py311-linux-{x86_64,aarch64}-restapi-requirements]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-restapi-requirements.txt" --resolver=backtracking --extra mlflow-skinny --upgrade --verbose "pyproject.toml" "docker{/}pip-tools{/}restapi-requirements.in"
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-restapi-requirements.txt" --resolver=backtracking --extra mlflow-skinny --upgrade --verbose "pyproject.toml" "docker{/}pip-tools{/}restapi-requirements.in"
[testenv:py311-linux-{x86_64,aarch64}-tensorflow2-cpu-requirements]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-tensorflow2-cpu-requirements.txt" --resolver=backtracking --extra mlflow-full --extra postgres --extra worker --upgrade --verbose "pyproject.toml" "requirements-dev-tensorflow.in"
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-tensorflow2-cpu-requirements.txt" --resolver=backtracking --extra mlflow-full --extra postgres --extra worker --upgrade --verbose "pyproject.toml" "requirements-dev-tensorflow.in"
[testenv:py311-linux-x86_64-tensorflow2-gpu-requirements]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-tensorflow2-gpu-requirements.txt" --resolver=backtracking --extra mlflow-full --extra postgres --extra worker --upgrade --verbose "pyproject.toml" "requirements-dev-tensorflow-gpu.in"
[testenv:py311-linux-{x86_64,aarch64}-pytorch-cpu-requirements]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-pytorch-cpu-requirements.txt" --resolver=backtracking --extra mlflow-full --extra postgres --extra worker --upgrade --verbose "pyproject.toml" "requirements-dev-pytorch.in"
py311-linux-aarch64: pip-compile --output-file "venvs{/}linux-arm64-py3.11-pytorch-cpu-requirements.txt" --resolver=backtracking --extra mlflow-full --extra postgres --extra worker --upgrade --verbose "pyproject.toml" "requirements-dev-pytorch.in"
[testenv:py311-linux-x86_64-pytorch-gpu-requirements]
deps =
pip-tools
skip_install = true
commands_pre = python -c 'from pathlib import Path;Path("{tox_root}", "venvs").mkdir(exist_ok=True)'
commands =
py311-linux-x86_64: pip-compile --output-file "venvs{/}linux-amd64-py3.11-pytorch-gpu-requirements.txt" --resolver=backtracking --extra mlflow-full --extra postgres --extra worker --upgrade --verbose "pyproject.toml" "requirements-dev-pytorch-gpu.in"
[testenv:rstcheck]
deps =
{[sphinx]deps}
rstcheck[sphinx,toml]
skip_install = true
commands = rstcheck {posargs:-r "{tox_root}{/}docs{/}source"}
[testenv:web-compile]
description = build documentation
deps =
web-compile>=0.2.3
skip_install = true
commands = web-compile --config "{tox_root}{/}web-compile-config.yml" {posargs:--no-git-add --exit-code 0}