-
Notifications
You must be signed in to change notification settings - Fork 259
/
pyproject.toml
202 lines (188 loc) · 4.68 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
[build-system]
requires = ["hatchling", "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 = { text = "MIT License" }
requires-python = ">=3.9"
dependencies = [
"numpy >=1.22",
"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",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Topic :: Scientific/Engineering",
]
# Version from setuptools_scm
dynamic = ["version"]
[project.urls]
"Homepage" = "https://nipy.org/nibabel"
"Development" = "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,minc2,spm,zstd]"]
# Features
dicom = ["pydicom >=2.3"]
dicomfs = ["nibabel[dicom]", "pillow"]
minc2 = ["h5py"]
spm = ["scipy"]
zstd = ["pyzstd >= 0.14.3"]
# For doc and test, make easy to use outside of tox
# tox should use these with extras instead of duplicating
doc = [
"sphinx",
"matplotlib>=3.5",
"numpydoc",
"texext",
"tomli; python_version < '3.11'",
]
test = [
"pytest",
"pytest-doctestplus",
"pytest-cov",
"pytest-httpserver",
"pytest-xdist",
"coverage>=7.2",
]
# Remaining: Simpler to centralize in tox
dev = ["tox"]
doctest = ["tox"]
style = ["tox"]
typing = ["tox"]
[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",
"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",
"C401",
"C408",
"C416",
"PERF203",
"PIE790",
"PT004", # deprecated
"PT005", # deprecated
"PT007",
"PT011",
"PT012",
"PT017",
"PT018",
"PYI024",
"RUF005",
"RUF012", # TODO: enable
"RUF015",
"RUF017", # TODO: enable
"UP027", # deprecated
"UP038", # https://github.com/astral-sh/ruff/issues/7871
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",
"ISC001",
"ISC002",
]
[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"