-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
49 lines (45 loc) · 1.15 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
[tox]
description = Default tox environments list
envlist =
style,py{39,310,311,312}{,-coverage},doc
skip_missing_interpreters = true
[testenv]
description = Checks for project unit tests and coverage (if desired)
basepython =
py310: python3.10
py311: python3.11
py312: python3.12
py313: python3.13
py: python3
{style,reformat,doc,build}: python3
passenv = HPS_TEST_*
setenv =
PYTHONUNBUFFERED = yes
PYTEST_EXTRA_ARGS = -ra
deps =
-e .[tests]
commands =
pytest {env:PYTEST_EXTRA_ARGS:} --junitxml test_results-{envname}.xml {posargs:-vv}
[testenv:py{39,310,311,312}-coverage]
commands =
coverage run -m pytest {env:PYTEST_EXTRA_ARGS:} --junitxml test_results-{envname}.xml {posargs:-vv}
coverage report
coverage html
coverage xml
[testenv:style]
description = Checks project code style
skip_install = true
deps =
pre-commit
commands =
pre-commit install
pre-commit run --all-files --show-diff-on-failure
[testenv:doc]
description = Check if documentation generates properly
deps =
-e .[doc]
allowlist_externals = make
commands =
python archive_examples.py
make -C doc html
make -C doc pdf