forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
407 lines (375 loc) · 10.2 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
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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "mne"
description = "MNE-Python project for MEG and EEG data analysis."
dynamic = ["version"]
authors = [
{ name = "Alexandre Gramfort", email = "alexandre.gramfort@inria.fr" },
]
maintainers = [{ name = "Dan McCloy", email = "dan@mccloy.info" }]
license = { text = "BSD-3-Clause" }
readme = { file = "README.rst", content-type = "text/x-rst" }
requires-python = ">=3.9"
keywords = [
"neuroscience",
"neuroimaging",
"MEG",
"EEG",
"ECoG",
"fNIRS",
"brain",
]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved",
"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",
]
scripts = { mne = "mne.commands.utils:main" }
dependencies = [
"numpy>=1.23",
"scipy>=1.9",
"matplotlib>=3.6",
"tqdm",
"pooch>=1.5",
"decorator",
"packaging",
"jinja2",
"lazy_loader>=0.3",
]
[project.optional-dependencies]
# Variants with dependencies that will get installed on top of those listed unter
# project.dependencies
# Leave this one here for backward-compat
data = []
# Dependencies for MNE-Python functions that use HDF5 I/O
hdf5 = ["h5io", "pymatreader"]
# Dependencies for full MNE-Python functionality (other than raw/epochs export)
# We first define a variant without any Qt bindings. The "complete" variant, mne[full],
# makes an opinionated choice and installs PyQt6.
# We also offter two more variants: mne[full-qt6] (which is equivalent to mne[full]),
# and mne[full-pyside6], which will install PySide6 instead of PyQt6.
full-no-qt = [
"mne[hdf5]",
"qtpy",
"pyobjc-framework-Cocoa>=5.2.0; platform_system=='Darwin'",
"sip",
"scikit-learn",
"nibabel",
"openmeeg>=2.5.5",
"numba",
"h5py",
"pandas",
"pyarrow", # only needed to avoid a deprecation warning in pandas
"jupyter",
"python-picard",
"joblib",
"psutil",
"dipy",
"vtk",
"nilearn",
"xlrd",
"imageio>=2.6.1",
"imageio-ffmpeg>=0.4.1",
"traitlets",
"pyvista>=0.32,!=0.35.2,!=0.38.0,!=0.38.1,!=0.38.2,!=0.38.3,!=0.38.4,!=0.38.5,!=0.38.6,!=0.42.0",
"pyvistaqt>=0.4",
"mffpy>=0.5.7",
"ipywidgets",
"ipympl",
"ipyevents",
"trame",
"trame-vtk",
"trame-vuetify",
"mne-qt-browser",
"darkdetect",
"qdarkstyle!=3.2.2",
"threadpoolctl",
# duplicated in test_extra:
"statsmodels",
"eeglabio",
"edfio>=0.2.1",
"pybv",
"snirf",
"defusedxml",
"neo",
]
full = ["mne[full-no-qt]", "PyQt6!=6.6.0", "PyQt6-Qt6!=6.6.0,!=6.7.0"]
full-pyqt6 = ["mne[full]"]
full-pyside6 = ["mne[full-no-qt]", "PySide6"]
# Dependencies for running the test infrastructure
test = [
"pytest>=8.0.0rc2",
"pytest-cov",
"pytest-timeout",
"pytest-qt",
"ruff",
"numpydoc",
"codespell",
"tomli; python_version<'3.11'",
"twine",
"wheel",
"pre-commit",
"mypy",
"vulture",
]
# Dependencies for being able to run additional tests (rare/CIs/advanced devs)
test_extra = [
"mne[test]",
"nitime",
"nbclient",
"sphinx-gallery",
"statsmodels",
"eeglabio",
"edfio>=0.2.1",
"pybv",
"imageio>=2.6.1",
"imageio-ffmpeg>=0.4.1",
"snirf",
"neo",
"mne-bids",
]
# Dependencies for building the documentation
doc = [
"sphinx>=6",
"numpydoc",
"pydata_sphinx_theme>=0.15.2",
"sphinx-gallery>=0.16",
"sphinxcontrib-bibtex>=2.5",
"sphinxcontrib-towncrier",
"memory_profiler",
"neo",
"seaborn!=0.11.2",
"sphinx_copybutton",
"sphinx-design",
"sphinxcontrib-youtube",
"mne-bids",
"pyxdf",
"mne-connectivity",
"mne-gui-addons",
"pygments>=2.13",
"pytest",
"graphviz",
"pyzmq!=24.0.0",
"ipython!=8.7.0",
"selenium",
"intersphinx_registry>=0.2405.27",
]
dev = ["mne[test,doc]", "rcssmin"]
[project.urls]
Homepage = "https://mne.tools/"
Download = "https://pypi.org/project/mne/#files"
"Bug Tracker" = "https://github.com/mne-tools/mne-python/issues/"
Documentation = "https://mne.tools/"
Forum = "https://mne.discourse.group/"
"Source Code" = "https://github.com/mne-tools/mne-python/"
[tool.hatch.build]
exclude = [
"/.*",
"/*.yml",
"/*.yaml",
"/*.toml",
"/*.txt",
"/mne/**/tests",
"/logo",
"/doc",
"/tools",
"/tutorials",
"/examples",
"/codemeta.json",
"/ignore_words.txt",
"/Makefile",
"/CITATION.cff",
"/CONTRIBUTING.md",
] # tracked by git, but we don't want to ship those files
[tool.hatch.version]
source = "vcs"
raw-options = { version_scheme = "release-branch-semver" }
[tool.codespell]
ignore-words = "ignore_words.txt"
builtin = "clear,rare,informal,names,usage"
skip = "doc/references.bib"
[tool.ruff]
exclude = ["__init__.py", "constants.py", "resources.py"]
[tool.ruff.lint]
select = ["A", "B006", "D", "E", "F", "I", "W", "UP", "UP031"]
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D413", # Missing blank line after last section
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = [
"property",
"setter",
"mne.utils.copy_function_doc_to_method_doc",
"mne.utils.copy_doc",
"mne.utils.deprecated",
]
[tool.ruff.lint.per-file-ignores]
"tutorials/time-freq/10_spectrum_class.py" = [
"E501", # line too long
]
"mne/datasets/*/*.py" = [
"D103", # Missing docstring in public function
]
"mne/utils/tests/test_docs.py" = [
"D101", # Missing docstring in public class
"D410", # Missing blank line after section
"D411", # Missing blank line before section
"D414", # Section has no content
]
"examples/*/*.py" = [
"D205", # 1 blank line required between summary line and description
]
"examples/preprocessing/eeg_bridging.py" = [
"E501", # line too long
]
[tool.pytest.ini_options]
# -r f (failed), E (error), s (skipped), x (xfail), X (xpassed), w (warnings)
# don't put in xfail for pytest 8.0+ because then it prints the tracebacks,
# which look like real errors
addopts = """--durations=20 --doctest-modules -rfEXs --cov-report= --tb=short \
--cov-branch --doctest-ignore-import-errors --junit-xml=junit-results.xml \
--ignore=doc --ignore=logo --ignore=examples --ignore=tutorials \
--ignore=mne/gui/_*.py --ignore=mne/icons --ignore=tools \
--ignore=mne/report/js_and_css \
--color=yes --capture=sys"""
junit_family = "xunit2"
[tool.bandit.assert_used]
skips = ["*/test_*.py"] # assert statements are good practice with pytest
[tool.rstcheck]
report_level = "WARNING"
ignore_roles = [
"attr",
"class",
"doc",
"eq",
"exc",
"file",
"footcite",
"footcite:t",
"func",
"gh",
"kbd",
"meth",
"mod",
"newcontrib",
"py:mod",
"ref",
"samp",
"term",
]
ignore_directives = [
"autoclass",
"autofunction",
"automodule",
"autosummary",
"bibliography",
"cssclass",
"currentmodule",
"dropdown",
"footbibliography",
"glossary",
"graphviz",
"grid",
"highlight",
"minigallery",
"tabularcolumns",
"toctree",
"rst-class",
"tab-set",
"towncrier-draft-entries",
]
ignore_messages = "^.*(Unknown target name|Undefined substitution referenced)[^`]*$"
[tool.mypy]
ignore_errors = true
scripts_are_modules = true
strict = false
modules = ["mne"]
# Avoid the conflict between mne/__init__.py and mne/__init__.pyi by ignoring the former
exclude = '^mne/(beamformer|channels|commands|datasets|decoding|export|forward|gui|html_templates|inverse_sparse|io|minimum_norm|preprocessing|report|simulation|source_space|stats|time_frequency|utils|viz)?/?__init__\.py$'
[[tool.mypy.overrides]]
module = ['scipy.*']
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = ['mne.annotations', 'mne.epochs', 'mne.evoked', 'mne.io']
ignore_errors = false
# Ignore "attr-defined" until we fix stuff like:
# - BunchConstNamed: '"BunchConstNamed" has no attribute "FIFFB_EVOKED"'
# - Missing __all__: 'Module "mne.io.snirf" does not explicitly export attribute "read_raw_snirf"'
# Ignore "no-untyped-call" until we fix stuff like:
# - 'Call to untyped function "end_block" in typed context'
# Ignore "no-untyped-def" until we fix stuff like:
# - 'Function is missing a type annotation'
# Ignore "misc" until we fix stuff like:
# - 'Cannot determine type of "_projector" in base class "ProjMixin"'
# Ignore "assignment" until we fix stuff like:
# - 'Incompatible types in assignment (expression has type "tuple[str, ...]", variable has type "str")'
# Ignore "operator" until we fix stuff like:
# - Unsupported operand types for - ("None" and "int")
disable_error_code = [
'attr-defined',
'no-untyped-call',
'no-untyped-def',
'misc',
'assignment',
'operator',
]
[tool.towncrier]
package = "mne"
directory = "doc/changes/devel/"
filename = "doc/changes/devel.rst"
title_format = "{version} ({project_date})"
issue_format = "`#{issue} <https://github.com/mne-tools/mne-python/pulls/{issue}>`__"
[[tool.towncrier.type]]
directory = "notable"
name = "Notable changes"
showcontent = true
[[tool.towncrier.type]]
directory = "dependency"
name = "Dependencies"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "apichange"
name = "API changes by deprecation"
showcontent = true
[[tool.towncrier.type]]
directory = "newfeature"
name = "New features"
showcontent = true
[[tool.towncrier.type]]
directory = "other"
name = "Other changes"
showcontent = true
[tool.changelog-bot]
[tool.changelog-bot.towncrier_changelog]
enabled = true
verify_pr_number = true
changelog_skip_label = "no-changelog-entry-needed"
[tool.vulture]
min_confidence = 60
paths = ['mne', 'tools/vulture_allowlist.py']
ignore_decorators = ['@observe']
exclude = [
'conftest.py',
'constants.py',
'mne/viz/backends/_qt.py',
'mne/viz/backends/_abstract.py',
'mne/viz/backends/_notebook.py',
]
verbose = false