-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
127 lines (108 loc) · 3.4 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
118
119
120
121
122
123
124
125
126
127
[base]
name = e_model_packager
testdeps =
NEURON
pytest
h5py
[tox]
envlist =
check-packaging
lint
py3-{unit,sscx,thalamus}
minversion = 4
# ignore basepython for envs that already specify a version
ignore_basepython_conflict = true
[testenv]
basepython=python
deps = {[base]testdeps}
passenv = KRB5CCNAME, DISPLAY, https_proxy, USER, GIT_SSH_COMMAND, HOME, XDG_CONFIG_HOME
allowlist_externals =
git
./.compile_mod.sh
setenv =
TOX_ENVBINDIR={envbindir}
OMP_NUM_THREADS=1
PIP_INDEX_URL = https://bbpteam.epfl.ch/repository/devpi/simple
PIP_EXTRA_INDEX_URL = https://pypi.python.org/simple
commands =
python tests/clear_output.py
unit: pytest -sx tests/unit
sscx,thalamus: git submodule update --recursive --init
sscx: ./.compile_mod.sh e_model_packager/sscx2020/extra_data/neurodamus-models/neocortex/mod/v6
sscx: pytest -sx tests/sscx
thalamus: ./.compile_mod.sh e_model_packager/thalamus/package_files/neurodamus-models/thalamus/mod
thalamus: pytest -sx tests/test_thalamus_workflow.py
[testenv:check-packaging]
deps =
wheel
twine
commands =
python setup.py sdist bdist_wheel -d {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
deps =
pycodestyle
pydocstyle
pylint
black
download = true
skip_install = true
commands =
pycodestyle {[base]name}
pydocstyle {[base]name}
pylint {[base]name}
black --check {[base]name} --extend-exclude=(e_model_packager/sscx2020/extra_data/neurodamus-models|e_model_packager/thalamus/package_files/neurodamus-models)
black --check tests
black --check setup.py
[testenv:format]
deps = black
commands =
black {[base]name}
black tests
black setup.py
[testenv:coverage]
basepython=python
usedevelop=True
deps =
{[base]testdeps}
pytest-cov
allowlist_externals =
git
./.compile_mod.sh
passenv = KRB5CCNAME, DISPLAY, https_proxy, USER, GIT_SSH_COMMAND, HOME, XDG_CONFIG_HOME
setenv =
TOX_ENVBINDIR={envbindir}
OMP_NUM_THREADS=1
PIP_INDEX_URL = https://bbpteam.epfl.ch/repository/devpi/simple
PIP_EXTRA_INDEX_URL = https://pypi.python.org/simple
coverage_options = --cov-append --cov-report=xml --cov-config=.coveragerc
commands =
python tests/clear_output.py
pytest --cov={[base]name} {[testenv:coverage]coverage_options} tests/unit
git submodule update --recursive --init
./.compile_mod.sh e_model_packager/sscx2020/extra_data/neurodamus-models/neocortex/mod/v6
pytest --cov={[base]name} {[testenv:coverage]coverage_options} tests/sscx
; coverage for thalamus
./.compile_mod.sh e_model_packager/thalamus/package_files/neurodamus-models/thalamus/mod
pytest --cov={[base]name} {[testenv:coverage]coverage_options} tests/test_thalamus_workflow.py
[testenv:docs]
changedir = doc
deps =
sphinx
sphinx-bluebrain-theme
# 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: wrong import position
[pycodestyle]
ignore = E731,W503,W504,E402
max-line-length = 100
[pydocstyle]
# ignore the following
# - D413: no blank line afer last section
add-ignore = D413, D107
convention = google
match_dir = (e_model_packager/sscx2020/extra_data/neurodamus-models|e_model_packager/thalamus/package_files/neurodamus-models)