-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
98 lines (88 loc) · 2.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
[base]
name = axon_synthesis
files = {[base]name} tests docs/source/conf.py setup.py
[tox]
envlist =
check-packaging
lint
docs
min_versions
py{310,311,312}
coverage
minversion = 3.18
[testenv]
extras =
mpi
mypy
test
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
commands =
pytest \
--basetemp={envtmpdir} \
--cov={[base]name} \
--cov-branch \
--cov-fail-under=60 \
--no-cov-on-fail \
--cov-report term-missing \
--cov-report html:reports/coverage-{envname} \
--cov-report xml:reports/coverage-{envname}.xml \
--html reports/pytest-{envname}.html \
--junit-xml=reports/pytest-{envname}.xml \
--self-contained-html \
--dcd-export-formatted-data \
--mypy \
{posargs}
[testenv:coverage]
skip_install = true
deps = coverage
allowlist_externals = /bin/bash
commands =
/bin/bash -c 'coverage combine .coverage-py*'
coverage xml
coverage report
[testenv:check-packaging]
skip_install = true
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:min_versions]
basepython = python3.10
deps =
Requirements-Builder
commands_pre =
requirements-builder --level=min --extras=mpi,mypy,test -o {envtmpdir}/requirements_min.txt setup.py
pip install -r {envtmpdir}/requirements_min.txt
pip freeze
[testenv:lint]
basepython = python3.10
deps =
pre-commit
pylint
commands =
pre-commit run --all-files --show-diff-on-failure
pylint -j {env:PYLINT_NPROCS:1} {[base]files}
[testenv:format]
basepython = python3.10
skip_install = true
deps =
codespell
pre-commit
commands =
codespell -i 3 -x .codespellignorelines -w {[base]files} README.md CHANGELOG.md docs/source --skip="*.html"
pre-commit run --all-files
[testenv:docs]
changedir = docs
extras = docs
allowlist_externals =
make
# set warnings as errors using the -W sphinx option
commands = make html SPHINXOPTS=-W
[gh-actions]
python =
3.10: py310, lint
3.11: py311, check-packaging
3.12: py312, docs