-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
51 lines (45 loc) · 1.26 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
[tox]
requires =
tox>=4
env_list = py{37,38,39,310,311,312}, format, type, lint, doc
[testenv]
description = Execute the tests
commands =
python -m pip install {posargs:.[test]}
python -m pytest -v \
--profile \
--cov \
--cov-config=pyproject.toml \
--cov-report=term \
--cov-report=html \
--junitxml=junit/{env_name}/test-results.xml \
{posargs:tests}
[testenv:format]
description = Format the code
skip_install = true
commands =
python -m pip install {posargs:.[format]}
python -m isort {posargs:src tests}
python -m black {posargs:src tests}
[testenv:type]
description = Check the types
commands =
python -m pip install {posargs:.[type]}
python -m mypy {posargs:src tests}
[testenv:lint]
description = Lint the code
skip_install = true
commands =
python -m pip install {posargs:.[lint]}
python -m pylint {posargs:src tests}
python -m pydocstyle {posargs:src tests}
[testenv:build]
description = Build the wheel package
commands =
python -m pip install {posargs:.[build]}
python -m build {posargs:.}
[testenv:doc]
description = Build the documentation
commands =
python -m pip install {posargs:.[doc]}
sphinx-build -b html {posargs:doc/source} {posargs:doc/build/html}