[build-system]
build-backend = "hatchling.build"
requires = ["hatch-vcs", "hatchling >= 1.27"]
[dependency-groups]
dev = ["pip >= 25.1", "pre-commit", "pyside6 >= 6.11.1", "rcssmin >= 1.1", {include-group = "doc"}, {include-group = "test_extra"}]
doc = [
"docutils >= 0.22",
"graphviz",
"intersphinx_registry >= 0.2405.27",
"ipython != 8.7.0",
"jupyterlite-pyodide-kernel >= 0.8",
"jupyterlite-sphinx >= 0.23",
"memory_profiler >= 0.16",
"mne-bids",
"mne-connectivity",
"mne-gui-addons",
"neo",
"numpydoc >= 0.5",
"openneuro-py >= 2020.1",
"psutil",
"pydata-sphinx-theme >= 0.15.2",
"pygments >= 2.13",
"pymef",
"pyvistaqt >= 0.11",
"pyxdf",
"pyzmq != 24.0.0",
"refleak >= 0.2.1",
"scikit-learn >= 1.5",
"seaborn >= 0.5, != 0.11.2",
"selenium >= 4.27.1",
"sphinx >= 6",
"sphinx-design",
"sphinx-gallery >= 0.16",
"sphinx_copybutton",
"sphinxcontrib-bibtex >= 2.5",
"sphinxcontrib-towncrier >= 0.5.0a0",
"sphinxcontrib-youtube",
]
doc-full = ["rpy2", {include-group = "doc"}]
lockfile_extras = [
"pandas >= 2.2, != 3.0.4",
"scikit-learn >= 1.5",
]
test = [
"codespell",
"ipython >= 8.20",
"numpydoc >= 1.6",
"pillow >= 10.2",
"pytest >= 8.0, != 9.1.0",
"pytest-cov >= 4.1",
"pytest-qt >= 4.3",
"pytest-rerunfailures",
"pytest-timeout >= 2.2",
"pytest-xdist >= 3.6.1",
"refleak >= 0.2.1",
"ruff >= 0.1",
"threadpoolctl",
"twine",
"vulture",
]
test_extra = [
"jupyter_client",
"nbclient",
"nitime >= 0.7",
"pymef",
"statsmodels",
{include-group = "test_extra_ft"},
]
test_extra_ft = [
"edfio >= 0.4.10",
"eeglabio",
"hedtools",
"imageio >= 2.6.1",
"imageio-ffmpeg >= 0.4.1",
"mne-bids",
"nbformat",
"neo",
"pybv",
"snirf",
"sphinx",
"sphinx-gallery",
{include-group = "test"},
]
[project]
authors = [
{email = "alexandre.gramfort@inria.fr", name = "Alexandre Gramfort"},
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
]
dependencies = [
"decorator >= 5.1",
"jinja2 >= 3.1",
"lazy_loader >= 0.3",
"matplotlib >= 3.9",
"numpy >= 2.1, < 3",
"packaging",
"pooch >= 1.5",
"scipy >= 1.14",
"tqdm >= 4.66",
]
description = "MNE-Python is an open-source Python package for exploring, visualizing, and analyzing human neurophysiological data. It provides methods for data input/output, preprocessing, visualization, source estimation, time-frequency analysis, machine learning, and statistics."
dynamic = ["version"]
keywords = [
"brain",
"DBS",
"deep brain stimulation",
"ECoG",
"EEG",
"electrocorticography",
"electroencephalography",
"fNIRS",
"functional near-infrared spectroscopy",
"iEEG",
"intracranial EEG",
"magnetoencephalography",
"MEG",
"neuroimaging",
"neuroscience",
]
license = "BSD-3-Clause"
license-files = ["LICENSE.txt"]
maintainers = [{email = "dan@mccloy.info", name = "Dan McCloy"}]
name = "mne"
readme = {content-type = "text/x-rst", file = "README.rst"}
requires-python = ">= 3.11"
scripts = {mne = "mne.commands.utils:main"}
[project.optional-dependencies]
data = []
full = ["mne[full-no-qt]", "PySide6 != 6.7.0, != 6.8.0, != 6.8.0.1, != 6.9.1"]
full-no-qt = [
"antio >= 0.5.0",
"curryreader >= 0.1.2",
"darkdetect",
"defusedxml",
"dipy >= 1.9",
"edfio >= 0.4.10",
"eeglabio",
"filelock >= 3.18.0",
"h5py >= 2.4",
"imageio >= 2.6.1",
"imageio-ffmpeg >= 0.4.1",
"ipyevents",
"ipympl",
"ipython >= 2.0, != 8.7.0",
"ipywidgets",
"joblib >= 0.8",
"jupyter",
"mffpy >= 0.11.0",
"mne-qt-browser >= 0.6",
"mne[hdf5]",
"neo",
"nest-asyncio2",
"nibabel >= 5.2",
"nilearn >= 0.10",
"numba >= 0.60",
"openmeeg >= 2.5.7",
"pandas >= 2.2, != 3.0.4",
"pillow",
"pyarrow",
"pybv",
"pymef",
"pyobjc-framework-Cocoa >= 5.2.0; platform_system == 'Darwin'",
"python-picard >= 0.4",
"pyvista >= 0.44",
"pyvistaqt >= 0.11",
"qdarkstyle >= 3.2.2",
"qtpy",
"scikit-learn >= 1.5",
"sip",
"snirf",
"statsmodels >= 0.6",
"threadpoolctl",
"traitlets",
"trame",
"trame-pyvista",
"trame-vtk",
"trame-vuetify != 3.2.3",
"vtk >= 9.2",
"xlrd",
]
full-pyqt6 = ["mne[full-no-qt]", "PyQt6 != 6.6.0", "PyQt6-Qt6 != 6.6.0, != 6.7.0"]
full-pyside6 = ["mne[full]"]
hdf5 = ["h5io >= 0.2.4", "pymatreader"]
[project.urls]
"Bug Tracker" = "https://github.com/mne-tools/mne-python/issues/"
Documentation = "https://mne.tools/"
Download = "https://pypi.org/project/mne/#files"
Forum = "https://mne.discourse.group/"
Homepage = "https://mne.tools/"
"Source Code" = "https://github.com/mne-tools/mne-python/"
[tool.bandit.assert_used]
skips = ["*/test_*.py"]
[tool.changelog-bot]
[tool.changelog-bot.towncrier_changelog]
changelog_skip_label = "no-changelog-entry-needed"
enabled = true
verify_pr_number = true
[tool.codespell]
builtin = "clear,rare,informal,names,usage"
ignore-words = "ignore_words.txt"
skip = "doc/references.bib"
[tool.hatch.build]
exclude = [
"/*.toml",
"/*.txt",
"/*.yaml",
"/*.yml",
"/.*",
"/CITATION.cff",
"/codemeta.json",
"/CONTRIBUTING.md",
"/doc",
"/examples",
"/ignore_words.txt",
"/logo",
"/Makefile",
"/mne/**/tests",
"/tools",
"/tutorials",
]
[tool.hatch.version]
raw-options = {version_scheme = "release-branch-semver"}
source = "vcs"
[tool.numpydoc_validation]
checks = [
"all",
"ES01",
"EX01",
"EX02",
"GL01",
"PR04",
"RT02",
"SA01",
"SA04",
]
exclude = [
'\.clear',
'\.get$',
'\.copy$',
'\.fromkeys',
'\.items',
'\.keys',
'\.move_to_end',
'\.pop',
'\.popitem',
'\.setdefault',
'\.update',
'\.values',
'\.append',
'\.count',
'\.extend',
'\.index',
'\.insert',
'\.remove',
'\.sort',
'\.__getitem__',
'\.__contains__',
'\.__hash__',
'\.__mul__',
'\.__sub__',
'\.__add__',
'\.__iter__',
'\.__div__',
'\.__neg__',
'mne\.utils\.deprecated',
]
[tool.pytest.ini_options]
addopts = [
"--capture=sys",
"--color=yes",
"--cov-branch",
"--cov-report=",
"--doctest-ignore-import-errors",
"--doctest-modules",
"--durations=20",
"--ignore=mne/gui/_*.py",
"--ignore=mne/icons",
"--ignore=mne/report/js_and_css",
"--junit-xml=junit-results.xml",
"--tb=short",
"-ra",
]
testpaths = [
"mne",
]
[tool.rstcheck]
ignore_directives = [
"autoclass",
"autofunction",
"automodule",
"autosummary",
"bibliography",
"card",
"cssclass",
"currentmodule",
"dropdown",
"footbibliography",
"glossary",
"graphviz",
"grid",
"highlight",
"minigallery",
"related-software",
"rst-class",
"tab-set",
"tabularcolumns",
"toctree",
"towncrier-draft-entries",
]
ignore_messages = "^.*(Unknown target name|Undefined substitution referenced)[^`]*$"
ignore_roles = [
"attr",
"bdg-info-line",
"bdg-primary-line",
"class",
"doc",
"eq",
"exc",
"file",
"footcite",
"footcite:t",
"func",
"gh",
"kbd",
"meth",
"mod",
"newcontrib",
"py:mod",
"ref",
"samp",
"term",
]
report_level = "WARNING"
[tool.ruff]
exclude = ["__init__.py", "constants.py", "resources.py"]
[tool.ruff.lint]
ignore = [
"D100",
"D104",
"D413",
]
select = ["A", "B006", "D", "E", "F", "I", "UP", "UP031", "W"]
[tool.ruff.lint.per-file-ignores]
"examples/*/*.py" = [
"D205",
"D400",
]
"examples/preprocessing/eeg_bridging.py" = [
"E501",
]
"mne/__init__.pyi" = [
"A004",
]
"mne/datasets/*/*.py" = [
"D103",
]
"mne/decoding/tests/test_*.py" = [
"E402",
]
"mne/utils/tests/test_docs.py" = [
"D101",
"D410",
"D411",
"D414",
]
"tutorials/*/*.py" = [
"D400",
]
"tutorials/time-freq/10_spectrum_class.py" = [
"E501",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = [
"mne.utils.copy_doc",
"mne.utils.copy_function_doc_to_method_doc",
"mne.utils.deprecated",
"property",
"setter",
]
[tool.tomlsort]
all = true
ignore_case = true
spaces_before_inline_comment = 2
trailing_comma_inline_array = true
[tool.tomlsort.overrides."tool.numpydoc_validation.exclude"]
inline_arrays = false
[tool.towncrier]
directory = "doc/changes/dev/"
filename = "doc/changes/dev.rst"
issue_format = "`#{issue} <https://github.com/mne-tools/mne-python/pull/{issue}>`__"
package = "mne"
title_format = "{version} ({project_date})"
[[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.ty.environment]
python-version = "3.11"
[tool.ty.src]
exclude = ["mne/io/**/tests"]
include = [
"mne/annotations.py",
"mne/epochs.py",
"mne/evoked.py",
"mne/io",
]
[tool.vulture]
exclude = [
'conftest.py',
'constants.py',
'mne/viz/backends/_abstract.py',
'mne/viz/backends/_notebook.py',
'mne/viz/backends/_qt.py',
]
ignore_decorators = ['@observe']
min_confidence = 60
paths = ['mne', 'tools/vulture_allowlist.py']
verbose = false