forked from nilearn/nilearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
206 lines (188 loc) · 5.16 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
; See https://tox.wiki/en/4.23.2/
[tox]
requires =
tox>=4
; run lint by default when just calling "tox"
env_list = lint
; ENVIRONMENTS
; ------------
[style]
description = common environment for style checkers (rely on pre-commit hooks)
skip_install = true
deps =
pre-commit
[min]
description = environment with minimum versions of all dependencies (plotting not included)
skip_install = false
deps =
joblib==1.2.0
nibabel==5.2.0
numpy==1.22.4
pandas==2.2.0
scikit-learn==1.4.0
scipy==1.8.0
[plotmin]
description = environment with minimum matplotlib version
skip_install = false
deps =
matplotlib==3.3.0
[matplotlib]
description = environment with matplotlib dependencies
skip_install = false
deps =
matplotlib>=3.3.0
[plotting]
description = environment with all plotting dependencies
skip_install = false
deps =
{[matplotlib]deps}
kaleido
plotly
kaleido ; platform_system != 'Windows'
kaleido==0.1.0.post1 ; platform_system == 'Windows'
[global_var]
passenv =
USERNAME
# Pass user color preferences through
PY_COLORS
FORCE_COLOR
NO_COLOR
CLICOLOR
CLICOLOR_FORCE
; COMMANDS
; --------
[testenv:lint]
description = run all linters and formatters
skip_install = true
deps =
{[style]deps}
commands =
pre-commit run --all-files --show-diff-on-failure {posargs:}
[testenv:prettier]
description = run prettier to check formatting html and css
skip_install = true
deps =
{[style]deps}
commands =
pre-commit run --all-files --show-diff-on-failure prettier
[testenv:latest]
description = run tests on latest version of all dependencies (plotting not included)
passenv = {[global_var]passenv}
extras = test
commands =
pytest --cov=nilearn --cov-report=xml --report=report.html -n auto {posargs:}
[testenv:plotting]
description = run tests on latest version of all dependencies
passenv = {[global_var]passenv}
extras = test
deps =
{[plotting]deps}
rich
commands =
{[testenv:latest]commands}
{[testenv:test_doc]commands}
[testenv:test_doc]
description = run tests on doc
passenv = {[global_var]passenv}
extras = test
deps =
{[plotting]deps}
commands =
pytest -n auto doc/_additional_doctests.txt --report=report_doc.html
; TODO find a way to rely on globbing instead of listing a specific folder
pytest -n auto --doctest-glob='*.rst' doc/manipulating_images/ --report=report_doc.html
[testenv:pre]
description = run latest and test_doc on pre-release version of all dependencies
passenv = {[global_var]passenv}
pip_pre = true
extras = test
deps =
{[plotting]deps}
pyarrow
rich
commands =
{[testenv:latest]commands}
{[testenv:test_doc]commands}
[testenv:min]
description = run tests on minimum version of all dependencies (plotting not included)
passenv = {[global_var]passenv}
extras = test
deps =
{[min]deps}
commands =
{[testenv:latest]commands}
[testenv:plot_min]
description = run tests on minimum version of all dependencies (no plotly).
Plotly is additional for supporting interactive plots
but is not actually needed to use nilearn plotting functionality
passenv = {[global_var]passenv}
extras = test
deps =
{[min]deps}
{[plotmin]deps}
commands =
{[testenv:latest]commands}
[testenv:nightly]
description = run tests on latest python with nightly build version of all dependencies
base_python = 3.13
passenv = {[global_var]passenv}
setenv =
PIP_INDEX_URL = {env:PIP_INDEX_URL:https://pypi.anaconda.org/scientific-python-nightly-wheels/simple}
PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:https://pypi.org/simple}
extras = test
pip_pre = true
allowlist_externals =
pip
deps =
{[plotting]deps}
pyarrow
rich
; recreating the environment to avoid dependency conflict when not starting from a clean slate
recreate = true
commands =
; not using uv for those install (for now)
pip install --verbose --upgrade git+https://github.com/nipy/nibabel
pip install --verbose --upgrade --pre --index-url {env:PIP_INDEX_URL} pandas scipy scikit-learn matplotlib numpy
pip install --verbose --upgrade --pre --index-url {env:PIP_INDEX_URL} numpy
pip list
pytest -n auto --report=report.html {posargs:}
[testenv:doc]
description = build doc with minimum supported version of python and all dependencies (plotting included).
base_python = 3.9
extras = doc
deps =
{[min]deps}
{[plotmin]deps}
setuptools
rich
plotly
kaleido
pyarrow
passenv =
{[global_var]passenv}
PATTERN
allowlist_externals =
make
commands =
make -C doc clean
; Update the authors file and the names file
; in case a contributor has been added to citation.cff
; but did not run the maint_tools/citation_cff_maint.py script.
python maint_tools/citation_cff_maint.py
make -C doc {posargs:}
[testenv:linkcheck]
description = check links in doc
extras = doc
passenv =
{[global_var]passenv}
allowlist_externals =
make
git
commands =
git fetch --tags
make -C doc clean
; Update the authors file and the names file
; in case a contributor has been added to citation.cff
; but did not run the maint_tools/citation_cff_maint.py script.
python maint_tools/citation_cff_maint.py
make -C doc linkcheck