-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
98 lines (88 loc) · 2.2 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 = emodel_generalisation
files = {[base]name} tests docs/source/conf.py setup.py
[tox]
envlist =
check-packaging
lint
docs
min_versions
py{38,39,310,311}
coverage
minversion = 3.18
[testenv]
extras = test
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:.coverage-{envname}}
NEURON_MODULE_OPTIONS='-nogui'
OMP_NUM_THREADS=1
NRNUNIT_USE_LEGACY=0
deps =
min_versions: Requirements-Builder
commands =
min_versions: requirements-builder --level=min --extras=test -o {envtmpdir}/requirements_min.txt setup.py
min_versions: pip install -r {envtmpdir}/requirements_min.txt
min_versions: pip freeze
nrnivmodl tests/data/mechanisms
pytest \
--basetemp={envtmpdir} \
--cov={[base]name} \
--cov-branch \
--cov-fail-under=25 \
--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 \
{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
[testenv:lint]
basepython = python3
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
skip_install = true
deps =
codespell
pre-commit
commands =
codespell -i 3 -x .codespellignorelines -w {[base]files} README.md CHANGELOG.md docs/source
pre-commit run --all-files
[testenv:docs]
basepython = python3.9
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.8: py38, lint
3.9: py39, docs, coverage
3.10: py310, check-packaging
3.11: py311