-
Notifications
You must be signed in to change notification settings - Fork 612
/
pyproject.toml
223 lines (208 loc) · 5.45 KB
/
pyproject.toml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
[project]
authors = [{name = "Nilearn developers"}]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"Programming Language :: C",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13"
]
dependencies = [
"joblib>=1.2.0",
"lxml",
"nibabel>=5.2.0",
"numpy>=1.22.4",
"pandas>=2.2.0",
"requests>=2.25.0",
"scikit-learn>=1.4.0",
"scipy>=1.8.0",
"packaging"
]
description = "Statistical learning for neuroimaging in Python"
# Version from setuptools_scm
dynamic = ["version"]
license = {text = "new BSD"}
name = "nilearn"
readme = "README.rst"
requires-python = ">=3.9"
[project.optional-dependencies]
# A combination of dependencies useful for developers
dev = [
"nilearn[plotting,doc,style,test]"
]
# Requirements necessary for building the documentation
doc = [
"nilearn[plotting]",
"furo",
"memory_profiler", # measuring memory during docs building
"myst-parser",
"numpydoc",
"ruamel.yaml",
"sphinx",
"sphinx-copybutton",
"sphinx-design",
"sphinx-gallery",
"sphinxcontrib-bibtex",
"sphinxext-opengraph"
]
# the following is kept for "backward compatibility"
plotly = ["nilearn[plotting]"]
# Necessary req to use nilearn's plotting module
# Kaleido version is pinned for windows due to bug
# See https://github.com/plotly/Kaleido/issues/134 for more detail
plotting = [
"matplotlib>=3.3.0",
"plotly",
"kaleido ; platform_system != 'Windows'",
"kaleido==0.1.0.post1 ; platform_system == 'Windows'"
]
style = [
'tox'
]
# For running unit and docstring tests
test = [
"coverage",
"pytest>=6.0.0",
"pytest-cov",
"pytest-randomly",
"pytest-reporter-html1>=0.9.2",
"pytest-xdist[psutil]",
"tox"
]
[project.urls]
Changelog = "https://nilearn.github.io/stable/changes/whats_new.html"
Development = "https://github.com/nilearn/nilearn"
Discussions = "https://neurostars.org/tag/nilearn"
Homepage = "https://nilearn.github.io"
[tool.codespell]
builtin = "clear,rare,en-GB_to_en-US"
ignore-words = ".github/codespell_ignore_words.txt"
skip = "./.git,*.cff,*.bib,*/tmp,plotly-gl3d-latest.min.js,jquery.min.js,localizer_behavioural.tsv,.mypy_cache,env,venv,./doc/auto_examples,./doc/modules/generated/*,./doc/_build,./maint_tools/*.html,./examples/*/results,AUTHORS.rst"
[tool.hatch.build.hooks.vcs]
version-file = "nilearn/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["nilearn"]
[tool.hatch.version]
source = "vcs"
[tool.pytest.ini_options]
addopts = "-ra --strict-config --strict-markers --doctest-modules --showlocals -s -vv --durations=0 --template=maint_tools/templates/index.html"
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS"
junit_family = "xunit2"
log_cli_level = "INFO"
minversion = "6.0"
xfail_strict = true
[tool.ruff]
extend-exclude = [
"nilearn/externals/*",
"doc/auto_examples/*"
]
include = ["pyproject.toml", "nilearn/**/*.py", "examples/**/*.py", "maint_tools/**/*.py", "doc/**/*.py"]
indent-width = 4
line-length = 79
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.ruff.lint]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
fixable = ["ALL"]
ignore = [
"ARG005",
"B028",
"B904",
"D105",
"D205",
"D208",
"D301",
"E741",
"ERA001",
"FURB105",
"N803",
"N806",
"PERF203",
"PIE790",
"PLR2004",
"PTH207",
"RUF012",
"UP038", # https://github.com/astral-sh/ruff/issues/7871
# Avoid linter rules conflicting with the formatter
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"COM812",
"COM819",
"D206",
"D300",
"E111",
"E114",
"E117",
"ISC001",
"ISC002",
"Q000",
"Q001",
"Q002",
"Q003",
"W191"
]
# List of all the ruff rules (includes why the rule matters)
# https://docs.astral.sh/ruff/rules/
select = [
"ARG",
"B",
"C4",
"C90",
"D",
"E",
"ERA",
"F",
"FLY",
"FURB",
"I",
"N",
"NPY",
"PERF",
"PIE",
"PTH",
"PD",
"PGH",
"PLR",
"RUF",
"SIM",
"UP",
"W"
]
unfixable = []
[tool.ruff.lint.mccabe]
max-complexity = 41
[tool.ruff.lint.per-file-ignores]
"**/{doc}/*" = ["D103"]
"**/{examples}/*" = ["B018", "D103", "D400", "E402"]
"**/{tests}/*" = ["D100", "D101", "D102", "D103", "E402"]
"__init__.py" = ["D104", "E402"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pylint]
# https://docs.astral.sh/ruff/settings/#lint_pylint_max-args
max-args = 26
# https://docs.astral.sh/ruff/settings/#lint_pylint_max-branches
max-branches = 48
# https://docs.astral.sh/ruff/settings/#lint_pylint_max-returns
max-returns = 7
# https://docs.astral.sh/ruff/settings/#lint_pylint_max-statements
max-statements = 151