-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
160 lines (143 loc) · 4.12 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
[base]
name = blue_cwl
path = src/blue_cwl
testdeps =
pytest
libsonata
voxcell
nexusforge
basetemp=tmptestdir/{envname}
minversion = 3.18
[tox]
envlist =
lint
docs
coverage
check-packaging
py{310,311,312}
[testenv]
deps = {[base]testdeps}
extras = viz
commands_pre = /bin/mkdir -p {[base]basetemp}
commands = python -m pytest --basetemp=tmptestdir/{envname} tests/unit {posargs}
allowlist_externals =
/bin/mkdir
./tests/functional/certificate.sh
[testenv:functional]
deps =
{[base]testdeps}
brainbuilder==0.18.4
passenv =
NEXUS_TOKEN
NEXUS_BASE
NEXUS_ORG
NEXUS_PROJ
MODULESHOME
MODULEPATH
LOADEDMODULES
_LMFILES_
setenv =
NEXUS_BASE = {env:NEXUS_BASE:https://staging.nise.bbp.epfl.ch/nexus/v1}
NEXUS_ORG = {env:NEXUS_ORG:bbp_test}
NEXUS_PROJ = {env:NEXUS_PROJ:studio_data_11}
SALLOC_ACCOUNT = {env:SALLOC_ACCOUNT:proj30}
commands_pre =
/bin/mkdir -p {[base]basetemp}
commands = python -m pytest --basetemp=tmptestdir/{envname} tests/functional
[testenv:functional-{nexus_ok,cell_composition,cell_position,placeholder_emodel_assignment,placeholder_morphology_assignment,connectome_placeholder,connectome_filtering}]
deps =
{[base]testdeps}
cell_position: brainbuilder==0.18.4
connectome_distance: connectome-manipulator==0.0.1.dev0
passenv =
NEXUS_TOKEN
NEXUS_BASE
NEXUS_ORG
NEXUS_PROJ
USER
MODULESHOME
MODULEPATH
LOADEDMODULES
_LMFILES_
setenv =
NEXUS_BASE = {env:NEXUS_BASE:https://staging.nise.bbp.epfl.ch/nexus/v1}
NEXUS_ORG = {env:NEXUS_ORG:bbp_test}
NEXUS_PROJ = {env:NEXUS_PROJ:studio_data_11}
MODULEPATH=/gpfs/bbp.cscs.ch/ssd/apps/bsd/modules/_meta
SALLOC_ACCOUNT = {env:SALLOC_ACCOUNT:proj30}
commands_pre =
/bin/mkdir -p {[base]basetemp}
commands =
nexus_ok: python -m pytest --basetemp=tmptestdir/{envname} tests/functional/test_nexus_ok.py
cell_composition: python -m pytest --basetemp=tmptestdir/{envname} tests/functional/test_cell_composition.py
cell_position: python -m pytest --basetemp=tmptestdir/{envname} tests/functional/test_cell_position.py
placeholder_emodel_assignment: python -m pytest --basetemp=tmptestdir/{envname} tests/functional/test_placeholder_emodel_assignment.py
connectome_placeholder: python -m pytest --basetemp=tmptestdir/{envname} tests/functional/test_connectome_generation_placeholder.py
connectome_filtering: python -m pytest --basetemp=tmptestdir/{envname} tests/functional/test_connectome_filtering_synapses.py
[testenv:check-packaging]
skip_install = true
deps =
build
twine
commands =
python -m build -o {envtmpdir}/dist
twine check {envtmpdir}/dist/*
[testenv:lint]
deps =
ruff
pylint
mypy
types-requests
types-PyYAML
commands =
ruff format --check {[base]path}
ruff check {[base]path}
pylint {[base]path}
mypy --show-error-codes --ignore-missing-imports {[base]path}
[testenv:format]
deps =
ruff
commands =
ruff check --fix --select I {[base]path}
ruff format {[base]path} tests
[testenv:coverage]
deps =
{[base]testdeps}
coverage[toml]
pytest-cov
extras = viz
commands =
python -m pytest --cov={[base]name} --basetemp=tmptestdir/{envname} tests/unit {posargs}
coverage xml
coverage html
[coverage:run]
# app is tested in functional tests
omit = */blue_cwl/app/*
[testenv:docs]
changedir = doc
extras = docs
commands =
sphinx-build -b html \
{toxinidir}/doc/source \
{toxinidir}/doc/build/html \
-d {toxinidir}/doc/build/doctrees \
-W -T
allowlist_externals =
/bin/mkdir
[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,E203
[pydocstyle]
# D413: no blank line after last section
# D415: First line should end with a period, question mark, or exclamation point
# D417: Missing argument description
add-ignore = D413, D415, D417
convention = google
[gh-actions]
python =
3.10: py310, lint
3.11: py311, docs
3.12: py312, check-packaging