-
Notifications
You must be signed in to change notification settings - Fork 14
/
tox.ini
68 lines (63 loc) · 1.85 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
[tox]
# minimally required tox version
minversion=4.0.0
envlist = py3
[base]
name = bluecellulab
[testenv]
envdir =
py3: {toxworkdir}/py3
deps =
pytest>=7.3.1,<8.0.0
pytest-cov>=4.1.0
pytest-timeout>=2.1.0
pytest-xdist>=3.3.1 # multiprocessing
pytest-forked>=1.6.0 # isolation
download = true
allowlist_externals =
make
./.compile_mod.sh
coverage
coverage_options = --cov-report=xml --cov={[base]name} --cov=tests
setenv =
NEURON_MODULE_OPTIONS='-nogui'
OMP_NUM_THREADS=1
commands =
make clean
./.compile_mod.sh . tests/mechanisms
pytest {[testenv]coverage_options} tests --ignore=tests/bluecellulab-bb5-tests/ --numprocesses=auto --timeout=600 -vsx --forked # exclude bb5-tests for now
coverage report --show-missing
coverage xml
[testenv:lint]
envdir={toxworkdir}/{envname}
deps =
pycodestyle>=2.10.0
mypy>=1.3.0,<1.7.0
pandas-stubs>=2.0.0
types-setuptools>=67.8.0.0
ruff>=0.0.270
docformatter>=1.7.2
commands =
ruff check . --select F541,F401 --per-file-ignores="__init__.py:F401"
pycodestyle {[base]name} --ignore=E501,W504,W503
pycodestyle tests --ignore=E501,W504,W503,E741
mypy . --ignore-missing-imports --disable-error-code=call-overload # remove once pandas-stubs makes a release after 1.5.3.230321
docformatter --check bluecellulab -r
[testenv:examples]
envdir={toxworkdir}/{envname}
deps =
pytest>=7.3.1,<9.0.0
pytest-xdist>=3.3.1 # multiprocessing
pytest-forked>=1.6.0 # isolation
nbmake>=1.5.1
scipy>=1.11.1
seaborn>=0.12.2
commands =
pytest --ignore=examples/7-Extra-Simulation/ --numprocesses=auto --forked --nbmake examples # exclude long tests
[testenv:docs]
envdir =
docs: {toxworkdir}/{envname}
changedir = docs
deps = -r{toxinidir}/docs/requirements_docs.txt
allowlist_externals = make
commands = make html SPHINXOPTS=-W