-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
72 lines (65 loc) · 1.62 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
[tox]
minversion = 4.11
envlist = py39, py310, py311
skip_missing_interpreters = True
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
[testenv]
package = editable
setenv =
TOXINIDIR = {toxinidir}
VIRTUALENV_PIP = 23.3.2
[testenv:py{39,310,311}]
description =
Run automated tests.
extras =
testing
commands =
python --version
python -m pip --version
python -m black --check src tests
python -m isort --check-only src tests
python -m pytest --verbose --doctest-modules --pylint src
python -m mypy -p iqm.cortex_cli
python -m pytest --verbose --pylint-rcfile=tests/.pylintrc --pylint --cov iqm.cortex_cli --cov-report=term-missing --junitxml=test_report.xml tests
python -m mypy tests
[testenv:format]
description =
Format the codebase.
skip_install = True
changedir = {toxinidir}
deps =
black ~= 23.12
commands =
black src tests
[testenv:docs]
description =
Invoke sphinx to build the docs.
setenv =
DOCSDIR = {toxinidir}/docs
BUILDDIR = {toxinidir}/build/sphinx
BUILD = html
extras =
docs
commands =
sphinx-build -b {env:BUILD} "{env:DOCSDIR}" "{env:BUILDDIR}/{env:BUILD}" -W
[testenv:clean]
description =
Delete all build artifacts.
skip_install = True
changedir = {toxinidir}
# We cannot simply use rm because the command has to exist in the testenv.
commands =
python -c 'from shutil import rmtree; rmtree("build", True); rmtree("dist", True); rmtree("docs/api", True)'
[testenv:build]
description =
Build the package.
skip_install = True
changedir = {toxinidir}
deps =
build[virtualenv] == 1.0.3
commands =
python -m build