-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
86 lines (76 loc) · 1.6 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
[base]
name = bluepyemodel
testdeps =
mock
numpy
pytest
max_line_length = 100
[tox]
envlist =
lint
isort
functional
py3
docs
minversion = 4
ignore_basepython_conflict = true
[testenv]
basepython = python3
extras = all
passenv = KRB5CCNAME, DISPLAY, https_proxy, USER, GIT_SSH_COMMAND, HOME, HOC_LIBRARY_PATH
deps =
neuron
pytest>=7.3.1
pytest-cov>=4.1.0
pytest-forked>=1.6.0 # isolation
download = true
allowlist_externals =
make
coverage
coverage_options = --cov-report=xml --cov-config=.coveragerc --cov={[base]name} --cov=tests
setenv =
NEURON_MODULE_OPTIONS='-nogui'
OMP_NUM_THREADS=1
commands =
make clean
# --forked is needed to run simulations with neuron in separate and clean processes
pytest {[testenv]coverage_options} tests -vsx --forked
coverage report --show-missing
coverage xml
[testenv:lint]
extras = all
deps =
pycodestyle
pylint
pydocstyle
black >= 22.3.0
isort
commands =
pycodestyle {[base]name}
pylint {[base]name}
isort --check-only --sl --diff {[base]name}
black --line-length {[base]max_line_length} --check {[base]name}
[testenv:format]
deps =
black
isort
commands =
isort --sl {[base]name}
black --line-length {[base]max_line_length} {[base]name}
[pycodestyle]
ignore = E731,W503,W504,E203,W605,E501,E402
[pydocstyle]
add-ignore = D413
convention = google
[isort]
line_length=100
profile=black
[testenv:docs]
changedir = doc
extras = docs
allowlist_externals =
make
dot
# set warnings as errors using the -W sphinx option
commands = make html
# SPHINXOPTS=-W