-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
117 lines (103 loc) · 2.82 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[base]
name = emodelrunner
testdeps =
NEURON
pytest
[tox]
envlist =
check-packaging
lint
py3-{unit,sscx,synplas,thalamus}
docs
minversion = 4
[gh-actions]
python =
3.8: py3
3.9: py3
3.10: py3
3.11: py3
3.12: check-packaging, lint, docs, py3
[testenv]
envdir =
py3{-unit,-sscx,-synplas,-thalamus}: {toxworkdir}/py3
py38{-unit,-sscx,-synplas,-thalamus}: {toxworkdir}/py38
py39{-unit,-sscx,-synplas,-thalamus}: {toxworkdir}/py39
py310{-unit,-sscx,-synplas,-thalamus}: {toxworkdir}/py310
py311{-unit,-sscx,-synplas,-thalamus}: {toxworkdir}/py311
py312{-unit,-sscx,-synplas,-thalamus}: {toxworkdir}/py312
deps =
{[base]testdeps}
coverage
pytest-cov
pytest-xdist
filelock
hypothesis
setenv =
NEURON_MODULE_OPTIONS='-nogui'
allowlist_externals =
make
./.compile_mod.sh
coverage_options = --cov-append --cov-report=xml --cov-config=.coveragerc
dist-options = -n 13 --dist loadgroup
commands =
make clean
make remove_test_output
unit: ./.compile_mod.sh examples/sscx_sample_dir mechanisms
unit: pytest -sx --cov=emodelrunner {[testenv]coverage_options} tests/unit_tests
sscx: ./.compile_mod.sh examples/sscx_sample_dir mechanisms
sscx: pytest -sx --cov=emodelrunner {[testenv]coverage_options} {[testenv]dist-options} tests/sscx_tests/
synplas: ./.compile_mod.sh examples/synplas_sample_dir mechanisms
synplas: pytest -sx --cov=emodelrunner {[testenv]coverage_options} tests/test_synplas.py
thalamus: ./.compile_mod.sh examples/thalamus_sample_dir mechanisms
thalamus: pytest -sx --cov=emodelrunner {[testenv]coverage_options} tests/thalamus_tests
[testenv:check-packaging]
envdir={toxworkdir}/{envname}
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
envdir={toxworkdir}/{envname}
deps =
pycodestyle
pydocstyle
pylint
black
download = true
commands =
pycodestyle {[base]name}
pydocstyle {[base]name}
pylint {[base]name}
black --check {[base]name}
black --check tests
[testenv:format]
envdir={toxworkdir}/{envname}
deps = black
commands =
black {[base]name}
black tests
[testenv:docs]
envdir={toxworkdir}/{envname}
changedir = doc
deps =
sphinx
sphinx-bluebrain-theme
importlib-metadata
# set warnings as errors using the -W sphinx option
commands = make html SPHINXOPTS=-W
allowlist_externals = make
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
# E402: module level import not at top of file
# E203: whitespace before ':'
[pycodestyle]
ignore = E731,W503,W504,E402,E203
max-line-length = 100
[pydocstyle]
# ignore the following
# - D413: no blank line afer last section
add-ignore = D413
convention = google