diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ab73b884d..0a1a5e0a5 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -193,6 +193,7 @@ jobs: - name: Install MNE (previous stable) if: matrix.mne-version == 'mne-prev-stable' # Have to install NumPy<2.1 here because of a change in positional arg handling + MNE 1.7 + # XXX: drop when mne < 1.8 is no longer supported run: | git clone --single-branch --branch maint/1.7 https://github.com/mne-tools/mne-python.git python -m pip install -e ./mne-python "numpy<2.1" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bf93a8412..b9161db60 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -181,6 +181,12 @@ The latter command will result in a faster build but produce no plots in the exa More information on our documentation setup can be found in our [mne-bids WIKI](https://github.com/mne-tools/mne-bids/wiki). +## A note on MNE-Python compatibility + +We aim to make `mne-bids` compatible with the current stable release of `mne`, as well as the previous stable release. +Both of these versions are tested in our continuous integration infrastructure. +Additional versions of `mne` may be compatible, but this is not guaranteed. + ## Instructions for first-time contributors When you are making your first contribution to `mne-bids`, we kindly request you to: diff --git a/README.md b/README.md index 331d741ff..5f13d4547 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ MNE-BIDS is a Python package that allows you to read and write Why? ---- -MNE-BIDS links BIDS and MNE-Python with the goal to make your analyses faster to code, more robust, and facilitate data and code sharing with co-workers and collaborators. +MNE-BIDS links BIDS and MNE-Python with the goal to make your analyses faster to code and more robust, +and to facilitate data and code sharing with co-workers and collaborators. How? ---- @@ -32,9 +33,8 @@ Getting Help ------------ [MNE Forum](https://mne.discourse.group) -For any usage questions, please post to the -[MNE Forum](https://mne.discourse.group). Be sure to add the `mne-bids` tag to -your question. +For any usage questions, please post to the [MNE Forum](https://mne.discourse.group). +Be sure to add the `mne-bids` tag to your question. Citing ------ diff --git a/doc/authors.rst b/doc/authors.rst index 552b8d4b0..407bbfc83 100644 --- a/doc/authors.rst +++ b/doc/authors.rst @@ -1,52 +1,52 @@ .. _Aaron Earle-Richardson: https://github.com/Aaronearlerichardson -.. _Mainak Jas: https://jasmainak.github.io/ -.. _Teon Brooks: https://teonbrooks.com -.. _Chris Holdgraf: https://bids.berkeley.edu/people/chris-holdgraf -.. _Matt Sanderson: https://github.com/monkeyman192 -.. _Stefan Appelhoff: https://stefanappelhoff.com/ -.. _Romain Quentin: https://github.com/romquentin -.. _Dominik Welke: https://github.com/dominikwelke -.. _Maximilien Chaumon: https://github.com/dnacombo -.. _Ezequiel Mikulan: https://github.com/ezemikulan -.. _Marijn van Vliet: https://github.com/wmvanvliet -.. _Alex Rockhill: https://github.com/alexrockhill -.. _Sophie Herbst: https://github.com/SophieHerbst .. _Adam Li: https://github.com/adam2392 -.. _Fu-Te Wong: https://github.com/zuxfoucault -.. _Richard Höchenberger: https://github.com/hoechenberger +.. _Alex Rockhill: https://github.com/alexrockhill .. _Alexandre Gramfort: http://alexandre.gramfort.net +.. _Amaia Benitez: https://github.com/AmaiaBA +.. _Anand Saini: https://github.com/anandsaini024 .. _Ariel Rokem: https://github.com/arokem -.. _Evgenii Kalenkovich: https://github.com/kalenkovich .. _Austin Hurst: https://github.com/a-hurst -.. _Robert Luke: https://github.com/rob-luke -.. _Ethan Knights: https://github.com/ethanknights +.. _Bruno Hebling Vieira: https://github.com/bhvieira +.. _Chris Holdgraf: https://bids.berkeley.edu/people/chris-holdgraf +.. _Clemens Brunner: https://github.com/cbrnr +.. _Daniel McCloy: http://dan.mccloy.info +.. _Denis Engemann: https://github.com/dengemann .. _Diego Lozano-Soldevilla: https://github.com/dieloz +.. _Dominik Welke: https://github.com/dominikwelke .. _Eduard Ort: https://github.com/eort -.. _Tom Donoghue: https://github.com/TomDonoghue -.. _Richard Köhler: https://github.com/richardkoehler -.. _Sin Kim: https://ohbm.github.io/osr2020/volunteers/sin_kim.html +.. _Eric Larson: https://github.com/larsoner +.. _Ethan Knights: https://github.com/ethanknights +.. _Evgenii Kalenkovich: https://github.com/kalenkovich +.. _Ezequiel Mikulan: https://github.com/ezemikulan +.. _Ford McDonald: https://github.com/fordmcdonald +.. _Franziska von Albedyll: https://www.researchgate.net/profile/Franziska-Von-Albedyll +.. _Fu-Te Wong: https://github.com/zuxfoucault .. _Jean-Rémi King: https://kingjr.github.io +.. _Jonathan Vanhoecke: https://sfb-retune.de/people/jonathan-vanhoecke/ .. _Julia Guiomar Niso Galán: https://github.com/guiomar -.. _Eric Larson: https://github.com/larsoner -.. _Clemens Brunner: https://github.com/cbrnr +.. _Julius Welzel: https://github.com/JuliusWelzel +.. _Kaare Mikkelsen: https://github.com/kaare-mikkelsen .. _Kambiz Tavabi: https://github.com/ktavabi -.. _Franziska von Albedyll: https://www.researchgate.net/profile/Franziska-Von-Albedyll -.. _Simon Kern: https://github.com/skjerns -.. _Yorguin Mantilla: https://github.com/yjmantilla -.. _Swastika Gupta: https://swastyy.github.io -.. _Scott Huberty: https://github.com/scott-huberty -.. _Anand Saini: https://github.com/anandsaini024 +.. _Laetitia Fesselier: https://github.com/laemtl +.. _Mainak Jas: https://jasmainak.github.io/ +.. _Mara Wolter: https://github.com/marakw +.. _Marijn van Vliet: https://github.com/wmvanvliet .. _Mathieu Scheltienne: https://github.com/mscheltienne -.. _Denis Engemann: https://github.com/dengemann -.. _Bruno Hebling Vieira: https://github.com/bhvieira -.. _Daniel McCloy: http://dan.mccloy.info +.. _Matt Sanderson: https://github.com/monkeyman192 +.. _Maximilien Chaumon: https://github.com/dnacombo .. _Moritz Gerster: http://moritz-gerster.com -.. _Laetitia Fesselier: https://github.com/laemtl -.. _Jonathan Vanhoecke: https://sfb-retune.de/people/jonathan-vanhoecke/ -.. _Ford McDonald: https://github.com/fordmcdonald .. _Pierre Guetschel: https://github.com/PierreGtch -.. _Mara Wolter: https://github.com/marakw -.. _Julius Welzel: https://github.com/JuliusWelzel -.. _Kaare Mikkelsen: https://github.com/kaare-mikkelsen -.. _Amaia Benitez: https://github.com/AmaiaBA +.. _Richard Höchenberger: https://github.com/hoechenberger +.. _Richard Köhler: https://github.com/richardkoehler +.. _Robert Luke: https://github.com/rob-luke +.. _Romain Quentin: https://github.com/romquentin +.. _Scott Huberty: https://github.com/scott-huberty +.. _Simon Kern: https://github.com/skjerns +.. _Sin Kim: https://ohbm.github.io/osr2020/volunteers/sin_kim.html +.. _Sophie Herbst: https://github.com/SophieHerbst +.. _Stefan Appelhoff: https://stefanappelhoff.com/ +.. _Swastika Gupta: https://swastyy.github.io +.. _Teon Brooks: https://teonbrooks.com .. _Thomas Hartmann: https://github.com/thht +.. _Tom Donoghue: https://github.com/TomDonoghue +.. _Yorguin Mantilla: https://github.com/yjmantilla diff --git a/doc/index.rst b/doc/index.rst index 0146f57db..0c0706d1e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -15,14 +15,14 @@ MNE-BIDS is a Python package that allows you to read and write Why? ---- -MNE-BIDS links BIDS and MNE-Python with the goal to make your analyses faster -to code, more robust, and facilitate data and code sharing with co-workers -and collaborators. +MNE-BIDS links BIDS and MNE-Python with the goal to make your analyses faster to code and more robust, +and to facilitate data and code sharing with co-workers and collaborators. What is this BIDS thing, anyway? -------------------------------- -BIDS, the Brain Imaging Data Structure, is a standard that describes how to -organize neuroimaging and electrophysiological data. In particular, it defines: +BIDS, the Brain Imaging Data Structure, +is a standard that describes how to organize neuroimaging and electrophysiological data. +In particular, it defines: - which file formats to use - how to name your files @@ -36,9 +36,9 @@ Supported file formats ---------------------- Currently, we support all file formats that are in the BIDS specification for MEG, EEG, fNIRS, and iEEG data. -We also support a range of additional manufacturer formats to facilitate converting them to their BIDS-recommended -formats. For example, if you have a Nihon Kohden file, you can read that file using MNE-Python, and -then use MNE-BIDS convert it to the BrainVision format and store it according to BIDS. +We also support a range of additional manufacturer formats to facilitate converting them to their BIDS-recommended formats. +For example, if you have a Nihon Kohden file, you can read that file using MNE-Python, +and then use MNE-BIDS convert it to the BrainVision format and store it according to BIDS. Citing MNE-BIDS --------------- diff --git a/doc/install.rst b/doc/install.rst index 3caa6c55d..f7017f0ac 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -31,7 +31,7 @@ Optional: We recommend installing ``mne-bids`` into an isolated Python environment, for example created via ``conda`` (may be obtained through `miniconda `_). -We require that you **use Python 3.9 or higher**. +We require that you **use Python 3.10 or higher**. You may choose to install ``mne-bids`` into your isolated Python environment `via pip <#installation-via-pip>`_ or `via conda <#installation-via-conda>`_. diff --git a/doc/whats_new.rst b/doc/whats_new.rst index 34e451527..9ae150b71 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -47,7 +47,6 @@ Detailed list of changes 🛠 Requirements ^^^^^^^^^^^^^^^ -- MNE-BIDS now requires MNE-Python 1.6.0 or higher. - MNE-BIDS now requires Python 3.10 or higher. 🪲 Bug fixes @@ -59,8 +58,8 @@ Detailed list of changes ⚕️ Code health ^^^^^^^^^^^^^^ -- Keep MNE-BIDS up to date with recent changes on participant birthday date handling in MNE-Python, by `Eric Larson`_ (gh:1278:) -- Make rules for linting more strict, make quality assessment exceptions less permissive, by `Stefan Appelhoff`_ (gh:1283:) +- Keep MNE-BIDS up to date with recent changes on participant birthday date handling in MNE-Python, by `Eric Larson`_ (:gh:`1278`) +- Make rules for linting more strict, make quality assessment exceptions less permissive, by `Stefan Appelhoff`_ (:gh:`1283`) :doc:`Find out what was new in previous releases ` diff --git a/doc/whats_new_previous_releases.rst b/doc/whats_new_previous_releases.rst index 5652d09b7..6dedd72e9 100644 --- a/doc/whats_new_previous_releases.rst +++ b/doc/whats_new_previous_releases.rst @@ -511,7 +511,7 @@ Enhancements - Modify iEEG tutorial to use MNE ``raw`` object, by `Alex Rockhill`_ (:gh:`859`) -- Add :func:`mne_bids.search_folder_for_text` to find specific metadata entries (e.g. all ``"n/a"`` sidecar data fields, or to check that "60 Hz" was written properly as the power line frequency), by `Alex Rockhill`_ (:gh: `870`) +- Add :func:`mne_bids.search_folder_for_text` to find specific metadata entries (e.g. all ``"n/a"`` sidecar data fields, or to check that "60 Hz" was written properly as the power line frequency), by `Alex Rockhill`_ (:gh:`870`) - Add :func:`mne_bids.get_bids_path_from_fname` to return a :class:`mne_bids.BIDSPath` from a file path, by `Adam Li`_ (:gh:`883`) @@ -566,7 +566,7 @@ Bug fixes - :func:`mne_bids.write_raw_bids` now raises an exception if the provided :class:`mne_bids.BIDSPath` doesn't contain ``subject`` and ``task`` entities, which are required for neurophysiological data, by `Richard Höchenberger`_ (:gh:`903`) -- :func:`mne_bids.read_raw_bids` now handles datasets with multiple electrophysiological data types correctly, by `Richard Höchenberger`_ (:gh:`910`, :gh`916`) +- :func:`mne_bids.read_raw_bids` now handles datasets with multiple electrophysiological data types correctly, by `Richard Höchenberger`_ (:gh:`910`, :gh:`916`) - More robust handling of situations where :func:`mne_bids.read_raw_bids` tries to read a file that does not exist, by `Richard Höchenberger`_ (:gh:`904`) diff --git a/mne_bids/tests/test_write.py b/mne_bids/tests/test_write.py index 7f50037ff..2f2c2bb61 100644 --- a/mne_bids/tests/test_write.py +++ b/mne_bids/tests/test_write.py @@ -623,7 +623,7 @@ def test_fif(_bids_validate, tmp_path): ) assert_array_almost_equal(raw.get_data(), raw2.get_data()) kwargs = dict() - # XXX: remove logic once support for mne<1.6 is dropped + # XXX: remove logic once support for mne<1.8 is dropped if "copy" in inspect.getfullargspec(epochs.get_data).kwonlyargs: kwargs["copy"] = False assert_array_almost_equal( diff --git a/mne_bids/write.py b/mne_bids/write.py index 8255ffffb..05b335154 100644 --- a/mne_bids/write.py +++ b/mne_bids/write.py @@ -479,7 +479,7 @@ def _participants_tsv(raw, subject_id, fname, overwrite=False): # determine the age of the participant age = subject_info.get("birthday", None) - if isinstance(age, tuple): # can be removed once MNE >= 1.8 is required + if isinstance(age, tuple): # XXX: can be removed once MNE >= 1.8 is required age = date(*age) meas_date = raw.info.get("meas_date", None) if isinstance(meas_date, tuple | list | np.ndarray): diff --git a/pyproject.toml b/pyproject.toml index b47bffe94..437c29c2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,6 @@ classifiers = [ "Operating System :: POSIX :: Linux", "Operating System :: MacOS", "Programming Language :: Python", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -53,7 +52,7 @@ full = [ "pymatreader >= 0.0.30", "matplotlib >= 3.5.0", "pandas >= 1.3.2", - "EDFlib-Python >= 1.0.6", # drop once mne <1.7 is no longer supported + "EDFlib-Python >= 1.0.6", # XXX: drop once mne <1.7 is no longer supported "edfio >= 0.2.1", "defusedxml", # For reading EGI MFF data and BrainVision montages ]