Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
330 lines (298 loc) · 9.21 KB
/
Copy pathpyproject.toml
File metadata and controls
330 lines (298 loc) · 9.21 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
[project]
name = 'scikit-image'
description = 'Image processing in Python'
requires-python = '>=3.12'
readme = 'README.md'
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: C',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Programming Language :: Python :: 3.15',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Software Development :: Libraries',
'Topic :: Scientific/Engineering',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
]
dynamic = ['version']
dependencies = [
'numpy>=2.2',
'scipy>=1.15; sys_platform != "emscripten"',
'scipy>=1.14; sys_platform == "emscripten"',
'networkx>=3.4',
'pillow>=10.1',
'imageio>=2.33,!=2.35.0',
'tifffile>=2025.1.10',
'packaging>=24',
'lazy-loader>=0.6',
]
[[project.maintainers]]
name = 'scikit-image developers'
email = 'skimage-core@discuss.scientific-python.org'
[project.license]
file = 'LICENSE.txt'
[project.optional-dependencies]
build = [
# Also update [build-system] -> requires
'meson-python>=0.16',
'ninja>=1.11.1.3',
'Cython>=3.2',
'pythran>=0.16',
'numpy>=2.2',
# Developer UI
'spin>=0.14',
'build>=1.3',
]
data = ['pooch>=1.6.0']
developer = [
'pre-commit',
'ipython',
'docstub==0.7.0rc0',
'scikit-image[asv]',
]
asv = [
'asv; sys_platform != "emscripten"',
]
docs = [
'sphinx>=8.0',
'sphinx-gallery[parallel]>=0.20',
'numpydoc>=1.7',
'sphinx-copybutton',
'sphinx-togglebutton',
'matplotlib>=3.10',
'dask[array]>=2025.1.0',
'pandas>=2.3',
'seaborn>=0.13',
'pooch>=1.6',
'tifffile>=2025.1.10',
'myst-parser',
'intersphinx-registry>=0.2411.14',
'ipywidgets',
'ipykernel', # needed until https://github.com/jupyter-widgets/ipywidgets/issues/3731 is resolved
'plotly>=6.1.1',
'kaleido>=1.0',
'scikit-learn>=1.6',
'sphinx_design>=0.5',
'pydata-sphinx-theme>=0.17',
'PyWavelets>=1.7',
'pytest-doctestplus>=1.6.0',
]
optional = [
'SimpleITK; sys_platform != "emscripten"',
'scikit-learn>=1.6',
'pyamg>=5.2; sys_platform != "emscripten" and python_version < "3.14"', # not packaged for Pyodide yet
'scikit-image[optional_free_threaded]'
]
optional_free_threaded = [
'astropy>=6.1',
'dask[array]>=2025.1.0',
'matplotlib>=3.10; sys_platform != "emscripten"', # the pyodide maintainers recommend not testing with matplotlib
'pooch>=1.6.0; sys_platform != "emscripten"', # requires stack switching with alternative pytest runner
'PyWavelets>=1.7',
]
test = [
'numpydoc>=1.7',
'pooch>=1.6.0; sys_platform != "emscripten"',
'pytest>=9',
'pytest-cov>=2.11.0',
'pytest-pretty',
'pytest-localserver',
'pytest-faulthandler',
'pytest-doctestplus>=1.6.0',
]
[project.urls]
homepage = 'https://scikit-image.org'
documentation = 'https://scikit-image.org/docs/stable'
source = 'https://github.com/scikit-image/scikit-image'
download = 'https://pypi.org/project/scikit-image/#files'
tracker = 'https://github.com/scikit-image/scikit-image/issues'
[build-system]
build-backend = 'mesonpy'
requires = [
'meson-python>=0.16',
'Cython>=3.2',
'pythran>=0.16',
'lazy-loader>=0.6',
'numpy>=2.0',
]
[tool.spin]
package = 'skimage'
[tool.spin.commands]
Build = [
'spin.cmds.meson.build',
'spin.cmds.pip.install',
'.spin/cmds.py:test',
'.spin/cmds.py:sdist',
]
Environments = [
'spin.cmds.meson.run',
'.spin/cmds.py:ipython',
'spin.cmds.meson.python',
]
Documentation = ['.spin/cmds.py:docs']
Metrics = [
'.spin/cmds.py:asv'
]
[tool.ruff.format]
quote-style = "preserve"
[tool.ruff.lint]
select = [
'F',
'E',
'W',
'UP',
'NPY201',
]
ignore = [
'E501',
'E741',
'E712',
'E721',
'UP038', # non-pep604-isinstance -- https://github.com/astral-sh/ruff/issues/7871
]
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
'E402',
'F401',
'F403',
'F405',
]
"**/__init__.pyi" = [
'E402',
'F401',
'F403',
'F405',
]
"src/skimage/_shared/testing.py" = ['F401']
"doc/examples/**/*.py" = ['E402']
[tool.ruff.lint.pydocstyle]
convention = 'numpy'
[tool.pytest.ini_options]
# pythonpath requires pytest >= 7.0; --strict-config (in addopts) would error
# on startup with older versions anyway.
minversion = "7.0"
# Add the repo root to sys.path so pytest can import from the ``tests/``
# directory without requiring ``__init__.py`` files in every subdirectory.
# It does not affect ``src/``; packages there are found via the installed
# wheel or the meson build directory (set up by spin).
pythonpath = ["."]
addopts = [
"-ra",
"--strict-config",
"--strict-markers",
"--showlocals",
# Necessary for doctest collection with editable installations and
# non-unique test module names (skimage/skimage2 duplicates those)
"--import-mode=importlib",
# See comment on `testpaths`
"--pyargs",
]
# For out-of-tree installations, selecting `src/` as a test path fails.
# Pytest doesn't expect the doctest's sources and installation to be
# different. Instead, we use `--pyargs` in the `addopts` field so that pytest
# can find docstests by importing.
testpaths = [
"skimage",
"_skimage2", # Exclude `skimage2` and its raised `ExperimentalAPIWarning`
"./tests/",
]
log_cli_level = "INFO"
xfail_strict = true
filterwarnings = [
"error",
"ignore::skimage.util.PendingSkimage2Change",
"ignore:.*use `imageio` or other I/O packages directly.*:FutureWarning",
# Passing win_size with gaussian_weights=True is deprecated
"ignore:.*win_size.*gaussian_weights.*:FutureWarning",
# warn by pyamg in ruge_stuben_solver
"ignore:Implicit conversion of A to CSR:scipy.sparse.SparseEfficiencyWarning",
# Pyodide warning coming via threadpoolctl, remove when
# https://github.com/joblib/threadpoolctl/pull/201 is released
"ignore:.*JsProxy\\.as_object_map.*:RuntimeWarning",
# Warning caused by matplotlib 3.7.0 because it uses deprecated API of pyparsing 3.3.1
"ignore:.*(parseString|resetCache|enablePackrat|oneOf).*:DeprecationWarning:matplotlib",
# tifffile (v2025.12.20) uses deprecated NumPy API
"ignore:Setting the shape on a NumPy array:DeprecationWarning:tifffile",
# SimpleITK (< 3.0) uses deprecated NumPy API; fixed in SimpleITK 3.0
# TODO: remove once SimpleITK >= 3.0 is required
"ignore:Setting the shape on a NumPy array:DeprecationWarning:SimpleITK",
# pytest warning when running under PYTHONOPTIMIZE=2 (assertions are stripped)
"ignore:assertions not in test modules or plugins:pytest.PytestConfigWarning",
]
norecursedirs = ["io/_plugins"]
[tool.changelist]
ignored_user_logins = [
"web-flow",
"pre-commit-ci[bot]"
]
[tool.docstub]
ignore_files = [
# deprecated, to be removed before v0.27
"io/_plugins",
"io/manage_plugins.py",
]
[tool.docstub.type_prefixes]
warnings = "warnings"
matplotlib = "matplotlib"
scipy = "scipy"
dask = "dask"
[tool.docstub.type_nicknames]
dtype-like = "np.typing.DTypeLike"
[tool.docstub.types]
Path = "pathlib.Path"
[tool.cibuildwheel]
test-command = "pytest --doctest-plus"
test-extras = ["test", "optional"]
test-sources = ["tests", "pyproject.toml"]
environment = {PIP_PREFER_BINARY=1}
environment-pass = ["SKIMAGE_LINK_FLAGS", "PIP_EXTRA_INDEX_URL", "COLUMNS"]
build-verbosity = 0
[tool.cibuildwheel.config-settings]
# Could be overwritten using CIBW_CONFIG_SETTINGS environment variable
[[tool.cibuildwheel.overrides]]
select = "cp3??t-*"
test-environment = {PYTHON_GIL=0}
test-extras = ["test", "optional_free_threaded"]
[[tool.cibuildwheel.overrides]]
select = "*-m*linux_aarch64"
test-extras = ["test", "optional_free_threaded"]
[[tool.cibuildwheel.overrides]]
select = "*-win_arm64"
test-extras = ["test", "optional_free_threaded"]
[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
test-extras = ["test", "optional_free_threaded"]
# SimpleITK does not support musllinux yet
[[tool.cibuildwheel.overrides]]
select = "cp315*"
# scikit-learn, matplotlib, PyWavelets, and astropy have no cp315 wheels yet,
# so the `optional` and `optional_free_threaded` extras cannot be installed.
# Drop this override once they publish for 3.15.
test-extras = ["test"]
[tool.cibuildwheel.linux]
environment = {PIP_PREFER_BINARY=1, SKIMAGE_LINK_FLAGS="-Wl,--strip-debug"}
[tool.cibuildwheel.windows]
archs = ["auto"]
# cibuildwheel 4.0 made delvewheel the default repair command on Windows. Five
# of our extension modules import msvcp140.dll, so the default would start
# bundling it; disabling repair keeps wheel contents as they have always been.
# Revisit as its own change, not as a side effect of a cibuildwheel bump.
repair-wheel-command = ""
[tool.cibuildwheel.macos]
test-command = "pytest"
before-all = [
"bash {project}/tools/build_libomp.sh",
]
[tool.cibuildwheel.pyodide]
test-command = "pytest"
test-extras = ["test", "optional_free_threaded"]