Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
384 lines (340 loc) · 9.33 KB
/
Copy pathpyproject.toml
File metadata and controls
384 lines (340 loc) · 9.33 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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
[project]
name = "spikeinterface"
version = "0.106.0"
authors = [
{ name="Alessio Buccino", email="alessiop.buccino@gmail.com" },
{ name="Samuel Garcia", email="sam.garcia.die@gmail.com" },
]
description = "Python toolkit for analysis, visualization, and comparison of spike sorting output"
readme = "README.md"
requires-python = ">=3.11"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: OS Independent"
]
dependencies = [
"numpy>=2.0.0;python_version<'3.14'",
"numpy>=2.3.2;python_version>='3.14'",
"threadpoolctl>=3.0.0",
"tqdm",
"zarr>=3,<4",
# for release we need pypi, so this needs to be commented
# "neo @ git+https://github.com/NeuralEnsemble/python-neo.git",
# "probeinterface @ git+https://github.com/SpikeInterface/probeinterface.git",
"neo>=0.14.6",
"probeinterface>=0.5.0",
"packaging",
"pydantic",
]
[build-system]
requires = ["setuptools>=78.0.2"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
package-data = {"spikeinterface.sorters" = ["**/*.m", "**/*.prm", "**/*.params", "**/*.yaml"]}
[tool.setuptools.exclude-package-data]
spikeinterface = ["**/tests/test_*"]
[tool.setuptools.packages.find]
where = ["src"]
include = ["spikeinterface*"]
namespaces = false
exclude = ["spikeinterface.*.tests"]
[tool.ruff]
line-length = 120
force-exclude = true
[tool.ruff.lint]
select = ['E4', 'E7', 'E9', 'F']
exclude = ["**/tests/**", "**/test_*.py", "**/conftest.py", "examples/**", "doc/conf.py", "installation_tips/**"]
ignore = ['E741', 'E731', 'F821']
# report but never auto-remove unused imports/variables: they may be side-effect imports, re-exports, or calls that advance state
unfixable = ['F401', 'F841']
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ['F401', 'F403']
"src/spikeinterface/full.py" = ['F403']
"src/spikeinterface/core/testing_tools.py" = ['E402', 'F403']
"src/spikeinterface/extractors/extractor_classes.py" = ['F401', 'F403']
[project.urls]
homepage = "https://github.com/SpikeInterface/spikeinterface"
repository = "https://github.com/SpikeInterface/spikeinterface"
documentation = "https://spikeinterface.readthedocs.io/"
changelog = "https://spikeinterface.readthedocs.io/en/latest/whatisnew.html"
[project.optional-dependencies]
extractors = [
"MEArec>=1.8",
"pynwb>=2.6.0",
"hdmf-zarr>=0.14.0; python_version>='3.12'",
"pyedflib>=0.1.30",
"lxml", # lxml for neuroscope
"scipy",
"ibllib>=3.4.1", # streaming IBL
"pymatreader>=0.0.32", # For cell explorer matlab files
"zugbruecke>=0.2; sys_platform!='win32'", # For plexon2
]
streaming_extractors = [
"ibllib>=3.4.1", # streaming IBL
# Following dependencies are for streaming with nwb files
"pynwb>=2.6.0",
"fsspec",
"aiohttp",
"requests",
"hdmf-zarr>=0.14.0; python_version>='3.12'",
"remfile",
"s3fs>=2025.7.0"
]
preprocessing = [
"scipy",
]
postprocessing = [
"spikeinterface[preprocessing]",
"scipy",
"scikit-learn",
"numba>=0.59",
"matplotlib>=3.6",
]
metrics = [
"scikit-learn",
"scipy",
"pandas",
"numba>=0.59",
]
comparison = [
"scipy",
"pandas",
"networkx",
]
generation = [
"scipy",
"pandas",
]
sorters = [
"scipy",
"h5py",
"cuda-python>=11.8.6; platform_system != 'Darwin'",
]
sortingcomponents = [
"spikeinterface[preprocessing]",
"scipy",
"scikit-learn",
"numba>=0.59",
"networkx",
"hdbscan>=0.8.33",
# `torch` is an optional heavy dep used by neural-network peak detection,
# motion estimation, and template matching. Install separately if needed:
# pip install torch
# `medicine-neuro` is likewise optional (and itself depends on torch), needed only
# for the "medicine" motion estimation method. Install separately if needed:
# pip install "medicine-neuro>=1.7"
]
sorters_internal = [
"spikeinterface[sortingcomponents]",
"spikeinterface[preprocessing]",
]
curation = [
"spikeinterface[metrics]",
"spikeinterface[postprocessing]",
"spikeinterface[comparison]",
"pandas",
"scikit-learn",
"skops",
"huggingface_hub",
"numba>=0.59",
"networkx",
]
exporters = [
"spikeinterface[postprocessing]",
"spikeinterface[widgets]",
"pandas",
"pynapple",
]
widgets = [
"matplotlib>=3.6",
"ipympl",
"ipywidgets",
"seaborn>=0.13.0",
"figpack",
"figpack-spike-sorting",
"distinctipy",
]
lupin = [
"scipy",
"numba",
"scikit-learn",
"torch"
]
spykingcircus2 = [
"scipy",
"hdbscan",
"numba",
]
tridesclous2= [
"scipy",
"numba",
"scikit-learn",
"torch",
]
# `full` installs every module's optional feature deps. Defined as the union of
# per-module extras so adding a dep to a module propagates here automatically.
full = [
"spikeinterface[preprocessing]",
"spikeinterface[postprocessing]",
"spikeinterface[metrics]",
"spikeinterface[comparison]",
"spikeinterface[generation]",
"spikeinterface[sorters]",
"spikeinterface[sortingcomponents]",
"spikeinterface[sorters_internal]",
"spikeinterface[curation]",
"spikeinterface[exporters]",
"spikeinterface[widgets]",
]
docs = [
"Sphinx",
"ipython",
"sphinx_rtd_theme>=1.2",
"sphinx-gallery",
"sphinx-design",
"numpydoc",
"sphinxcontrib-jquery",
"autodoc_pydantic",
# for notebooks in the gallery
"MEArec", # Use as an example
"pandas", # in the modules gallery comparison tutorial
"hdbscan>=0.8.33", # For sorters spykingcircus2 + tridesclous
"numba>=0.59", # For many postprocessing functions
"networkx",
"seaborn",
"skops", # For automated curation
"scikit-learn", # For automated curation
"huggingface_hub", # For automated curation
]
dev = [
"spikeinterface[docs]",
"ruff",
"pre-commit",
]
[dependency-groups]
# Shared test infrastructure used by every per-module group.
test-common = [
"pytest",
"pytest-cov",
"pytest-mock",
"psutil",
]
test-core = [
{include-group = "test-common"},
"pandas",
]
test-extractors = [
{include-group = "test-common"},
"pooch>=1.8.2",
"datalad>=1.0.2",
]
test-streaming-extractors = [
{include-group = "test-common"},
"pooch>=1.8.2",
"datalad>=1.0.2",
"remfile",
"requests",
"aiohttp",
"fsspec",
"s3fs",
]
test-preprocessing = [
{include-group = "test-common"},
"ibllib>=3.4.1",
"pooch",
"datalad",
"torch", # preprocessing tests exercise sortingcomponents.motion.dredge
]
test-postprocessing = [
{include-group = "test-common"},
"pandas",
]
test-metrics = [{include-group = "test-common"}]
test-comparison = [
{include-group = "test-common"},
"numba>=0.59"
]
test-sorters-internal = [
{include-group = "test-common"},
"scipy",
"torch",
"hdbscan>=0.8.33",
"numba",
"scikit-learn",
]
test-sorters = [{include-group = "test-sorters-internal"}]
test-curation = [{include-group = "test-common"}]
test-widgets = [
{include-group = "test-common"},
"sortingview>=0.12.0",
"numba>=0.59", # For motion widget
"scikit-learn",
"pyvips",
"networkx",
"upsetplot-bombcell", # pandas>=3 compatible fork used by BombcellUpsetPlotWidget
]
test-exporters = [{include-group = "test-common"}]
test-sortingcomponents = [
{include-group = "test-common"},
"torch", # neural network peak detection, motion, matching
"medicine-neuro>=1.7", # "medicine" motion estimation method
"huggingface_hub", # for `test_single_channel_toy_denoiser_in_peak_pipeline`
]
test-generation = [
{include-group = "test-common"},
"fsspec",
"s3fs",
"numba>=0.59", # numba and sklearn needed for motion correction of
"scikit-learn", # syntheic data used in `test_generate_hybrid_motion`
]
# Aggregate group for workflows that run the full test suite (nightly codecov).
test-all = [
{include-group = "test-core"},
{include-group = "test-extractors"},
{include-group = "test-streaming-extractors"},
{include-group = "test-preprocessing"},
{include-group = "test-postprocessing"},
{include-group = "test-metrics"},
{include-group = "test-comparison"},
{include-group = "test-sorters"},
{include-group = "test-sorters-internal"},
{include-group = "test-curation"},
{include-group = "test-widgets"},
{include-group = "test-exporters"},
{include-group = "test-sortingcomponents"},
{include-group = "test-generation"},
]
# Tools for the pre-commit hooks. uv installs this group by default.
dev = [
"ruff",
"pre-commit",
]
[tool.pytest.ini_options]
testpaths = ["src"]
markers = [
"core",
"generation",
"extractors",
"preprocessing",
"postprocessing",
"mertrics",
"sorters",
"sorters_external",
"sorters_internal",
"comparison",
"curation",
"exporters",
"widgets",
"sortingcomponents",
"streaming_extractors: extractors that require streaming such as ross and fsspec",
]
filterwarnings =[
'ignore:.*distutils Version classes are deprecated.*:DeprecationWarning',
'ignore:.*the imp module is deprecated in favour of importlib.*:DeprecationWarning',
]