-
Notifications
You must be signed in to change notification settings - Fork 295
Expand file tree
/
Copy pathpyproject.toml
More file actions
232 lines (216 loc) · 5.73 KB
/
Copy pathpyproject.toml
File metadata and controls
232 lines (216 loc) · 5.73 KB
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
224
225
226
227
228
229
230
231
232
[build-system]
requires = ["hatchling>=1.27", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "nibabel"
description = "Access a multitude of neuroimaging data formats"
authors = [{ name = "NiBabel developers", email = "neuroimaging@python.org" }]
maintainers = [{ name = "Christopher Markiewicz" }]
readme = "README.rst"
license = "MIT"
requires-python = ">=3.10"
dependencies = [
"numpy >=1.25",
"packaging >=20",
"importlib_resources >=5.12; python_version < '3.12'",
"typing_extensions >=4.6; python_version < '3.13'",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
]
# Version from hatch-vcs
dynamic = ["version"]
[project.urls]
homepage = "https://nipy.org/nibabel"
source = "https://github.com/nipy/nibabel"
[project.scripts]
nib-conform = "nibabel.cmdline.conform:main"
nib-convert = "nibabel.cmdline.convert:main"
nib-ls = "nibabel.cmdline.ls:main"
nib-dicomfs = "nibabel.cmdline.dicomfs:main"
nib-diff = "nibabel.cmdline.diff:main"
nib-stats = "nibabel.cmdline.stats:main"
nib-nifti-dx = "nibabel.cmdline.nifti_dx:main"
nib-tck2trk = "nibabel.cmdline.tck2trk:main"
nib-trk2tck = "nibabel.cmdline.trk2tck:main"
nib-roi = "nibabel.cmdline.roi:main"
parrec2nii = "nibabel.cmdline.parrec2nii:main"
[project.optional-dependencies]
all = ["nibabel[dicomfs,indexed_gzip,minc2,spm,zstd]"]
# Features
indexed_gzip = ["indexed_gzip >=1.6"]
dicom = ["pydicom >=2.3"]
dicomfs = ["nibabel[dicom]", "pillow >=8.4"]
minc2 = ["h5py >=3.8"]
spm = ["scipy >=1.11"]
viewers = ["matplotlib >=3.7"]
zstd = ["backports.zstd >=1.1; python_version<'3.14'"]
# Test dependencies, to allow testing an installed package
test = [
"pytest >=8",
"pytest-doctestplus >=1.4",
"pytest-cov >=6",
"pytest-httpserver >=1.0.7",
"pytest-xdist >=3.5",
"pytest-run-parallel >=0.8.2",
"coverage[toml]>=7.2",
]
# Development dependencies; transferred to dependency-groups, here to avoid
# breaking existing users of these extras.
doc = []
dev = []
doctest = []
style = []
typing = []
[dependency-groups]
dev = [
"pre-commit>=4.5.1",
"pre-commit-uv>=4.2.1",
"tox>=4.48.1",
"tox-uv>=1.33.1",
]
doc = [
"sphinx >=7.4",
"pydata-sphinx-theme >= 0.17.0",
"sphinx-design <= 0.7.0",
"sphinx-copybutton >= 0.5.2",
"matplotlib>=3.5",
"numpydoc >=1.9",
"texext >=0.6.8",
"tomli >=2.3; python_version < '3.11'",
]
typecheck = [
"mypy >=1.15",
"nibabel[all]",
# Easier than including a bunch of unnecessary deps
"pytest >=8",
"types-pillow>=10.2.0.20240822",
]
# Replaced by pre-commit
style = []
[tool.hatch.build.targets.sdist]
exclude = [
".git_archival.txt",
# Submodules with large files; if we don't want them in the repo...
"nibabel-data/",
]
[tool.hatch.build.targets.wheel]
packages = ["nibabel"]
exclude = [
# 56MB test file does not need to be installed everywhere
"nibabel/nicom/tests/data/4d_multiframe_test.dcm",
]
[tool.hatch.version]
source = "vcs"
tag-pattern = '(?P<version>\d+(?:\.\d+){0,2}[^+]*)(?:\+.*)?$'
raw-options = { version_scheme = "release-branch-semver" }
[tool.hatch.build.hooks.vcs]
version-file = "nibabel/_version.py"
# Old default setuptools_scm template; hatch-vcs currently causes
# a noisy warning if template is missing.
template = '''
# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = version = {version!r}
__version_tuple__ = version_tuple = {version_tuple!r}
'''
[tool.ruff]
line-length = 99
exclude = ["doc", "nibabel/externals", "tools", "version.py", "versioneer.py"]
[tool.ruff.lint]
select = [
"B",
"C4",
"F",
"FLY",
"FURB",
"I",
"ISC",
"PERF",
"PGH",
"PIE",
"PLE",
"PT",
"PYI",
"Q",
"RSE",
"RUF",
"TCH",
"UP",
]
ignore = [
"B006", # TODO: enable
"B008", # TODO: enable
"B007",
"B011",
"B017", # TODO: enable
"B018",
"B020",
"B023", # TODO: enable
"B028",
"B904",
"B905", # Consider: add explicit strict kwarg to zip calls
"C401",
"C408",
"C416",
"PERF203",
"PIE790",
"PT007",
"PT010", # Consider: Set expected exception in pytest.raises
"PT011",
"PT012",
"PT017",
"PT018",
"PT028", # Consider: Test function parameter has default argument
"PT030", # Consider: pytest.warns(UserWarning) is too broad
"PT031", # Consider: pytest.warns(UserWarning) block should contain 1 statement
"PYI024",
"RUF005",
"RUF007", # Consider: itertools.pairwise(x) over zip(x[:-1], x[1:])
"RUF012", # TODO: enable
"RUF015",
"RUF017", # TODO: enable
"RUF059", # Consider: Unpacked variables never used
"RUF061", # Consider: Use context-manager form of pytest.raises
"TC003", # Consider: Move import into type-checking block
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"doc/source/conf.py" = ["F401"]
[tool.ruff.format]
quote-style = "single"
[tool.mypy]
python_version = "3.11"
exclude = [
"/tests",
]
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
[tool.codespell]
skip = "*/data/*,./nibabel-data"
ignore-words-list = "ans,te,ue,ist,nin,nd,ccompiler,ser"
[tool.uv.pip]
only-binary = ["numpy", "scipy", "h5py"]