forked from nilearn/nilearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
176 lines (160 loc) · 4.41 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
; See https://tox.wiki/en
[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:test_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:test_plotting]
description = run tests on latest version of all dependencies
passenv = {[global_var]passenv}
extras = test
deps =
rich
{[plotting]deps}
commands =
{[testenv:test_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:test_pre]
description = run test_latest and test_doc on pre-release version of all dependencies
passenv = {[global_var]passenv}
pip_pre = true
extras = test
deps =
{[plotting]deps}
commands =
{[testenv:test_latest]commands}
{[testenv:test_doc]commands}
[testenv:test_min]
description = run tests on minimum version of all dependencies (plotting not included)
passenv = {[global_var]passenv}
extras = test
deps =
{[min]deps}
commands =
{[testenv:test_latest]commands}
[testenv:test_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:test_latest]commands}
[testenv:test_nightly]
description = run tests on nightly build version of all dependencies
passenv = {[global_var]passenv}
setenv =
nightlies_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
extras = test
deps =
{[plotting]deps}
; recreating the environment to avoid dependency conflict when not starting from a clean slate
recreate = true
commands =
pip install git+https://github.com/nipy/nibabel
pip install --pre --upgrade -i {env:nightlies_url} pandas scipy scikit-learn matplotlib
pip install --pre --upgrade -i {env:nightlies_url} numpy
pytest -n auto {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}
rich
plotly
kaleido
passenv =
{[global_var]passenv}
PATTERN
VERSIONTAG
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:}