This repository was archived by the owner on Feb 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
166 lines (153 loc) · 4.79 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
[base]
name = circuit_build
testdeps =
pytest
pytest-xdist
pytest-basetemp-permissions
pytest_options = -vvs --basetemp={envtmpdir} --basetemp-permissions=770
pip_index_url = https://bbpteam.epfl.ch/repository/devpi/simple
[tox]
minversion = 4
# ignore basepython for envs that already specify a version
ignore_basepython_conflict = true
[testenv]
basepython=python3.11
deps = {[base]testdeps}
commands = pytest {[base]pytest_options} tests/unit {posargs}
setenv =
PIP_INDEX_URL = {[base]pip_index_url}
[testenv:functional]
deps =
{[base]testdeps}
numpy>=1.14
pandas>=0.24
voxcell>=2.7.0
h5py
archngv
bluepysnap
vascpy
morphio
morph-tool
libsonata
setenv =
PIP_INDEX_URL = {[base]pip_index_url}
# set to "true" during tests to redirect logs to stderr instead of files
LOG_ALL_TO_STDERR = true
# Allow to override the account used to run tests
SALLOC_ACCOUNT = {env:SALLOC_ACCOUNT:proj66}
passenv =
# Variables needed to make `module purge` work as expected in bbp_env.
# If they are not propagated, there could be an issue caused by the
# wrong python version, reproducible with these steps on BB5:
# - module purge
# - module load archive/2020-08 python/3.7.4 (this will modify PATH)
# - module unload archive/2020-08
# - module load archive/2021-06 python-dev (or source a virtualenv with python 3.8 and tox)
# - module unload archive/2021-06
# - tox -e py38
# and the rule `init_cells` would fail because:
# - PATH is automatically passed by tox (see https://tox.readthedocs.io/en/latest/config.html#conf-passenv)
# - module purge executed in the rule wouldn't detect any module and wouldn't remove python-3.7.4 from PATH
# - module load archive/2020-08 brainbuilder/0.14.0 would automatically load python/3.7.4,
# but python-3.7.4 is not added to PATH because already present
# - the python binary with higher precedence is python 3.8 instead of python 3.7
MODULESHOME
MODULEPATH
LOADEDMODULES
_LMFILES_
# "--dist loadscope" Makes tests to be grouped by module, and groups are distributed to workers as
# whole units. This guarantees that all tests with the same group name run in the same worker.
commands = pytest {[base]pytest_options} --dist loadscope -n6 tests/functional {posargs}
[testenv:functional-{run,run_synthesis,ngv_standalone,ngv_full}]
deps = {[testenv:functional]deps}
setenv = {[testenv:functional]setenv}
passenv = {[testenv:functional]passenv}
allowlist_externals = bash
commands =
bash -c 'find tests/functional -name build -type d -print0 | xargs -0 rm -Rfv'
run: pytest {[base]pytest_options} tests/functional/test_run.py {posargs}
run_synthesis: pytest {[base]pytest_options} tests/functional/test_run_synthesis.py {posargs}
ngv_standalone: pytest {[base]pytest_options} tests/functional/ngv-standalone {posargs}
ngv_full: pytest {[base]pytest_options} tests/functional/ngv-full {posargs}
[testenv:docs]
changedir = doc
deps =
sphinx
sphinx-bluebrain-theme
sphinx-jsonschema!=1.19.0
sphinx-exec-code!=0.9
snakemake
commands =
# rebuild the the dot images used in the documentation
make -f Makefile_graphs
# set warnings as errors using the -W sphinx option
make html SPHINXOPTS=-W
setenv =
PIP_INDEX_URL = {[base]pip_index_url}
CIRCUIT_BUILD_SKIP_GIT_CHECK = true
allowlist_externals = make
[testenv:check-version]
skip_install = true
deps = bbp-nse-ci
commands = do_release.py -p . check-version
[testenv:check-packaging]
skip_install = true
deps =
wheel
twine
build
commands_pre =
rm -Rf build {[base]name}.egg-info
commands =
python -m build --outdir {envtmpdir}/dist
twine check {envtmpdir}/dist/*
allowlist_externals = rm
[testenv:graphs]
changedir = doc
deps = snakemake
whitelist_externals = make
commands = make -f Makefile_graphs
[testenv:lint]
deps =
black
isort
snakefmt>=0.4.2
pycodestyle
pydocstyle
pylint
commands =
isort --check-only --diff {[base]name}
black --check .
pycodestyle {[base]name}
pydocstyle {[base]name}
pylint {[base]name}
snakefmt --check .
[testenv:format]
deps =
black
isort
snakefmt>=0.4.2
commands =
isort {[base]name}
black .
snakefmt .
[testenv:coverage]
deps =
{[base]testdeps}
coverage
commands =
coverage run --source={[base]name} -m pytest {[base]pytest_options} tests/unit {posargs}
coverage report --show-missing
coverage xml
coverage html
[pycodestyle]
# E731: do not assign a lambda expression, use a def
# W503: line break after binary operator
# W504: line break before binary operator
# E501: line too long (checked with pylint)
ignore = E731,W503,W504,E501
[pydocstyle]
# ignore the following
# - D413: no blank line afer last section
add-ignore = D413
convention = google