diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index ef2ec0135..185997bef 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -202,16 +202,14 @@ jobs: - name: Install MNE (stable) if: matrix.mne-version == 'mne-stable' run: | - git clone --single-branch --branch maint/1.8 https://github.com/mne-tools/mne-python.git + git clone --single-branch --branch maint/1.9 https://github.com/mne-tools/mne-python.git python -m pip install -e ./mne-python - 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" + git clone --single-branch --branch maint/1.8 https://github.com/mne-tools/mne-python.git + python -m pip install -e ./mne-python - name: Install MNE (main) if: matrix.mne-version == 'mne-main' diff --git a/doc/install.rst b/doc/install.rst index 08e665072..d32b3291c 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -12,9 +12,9 @@ Dependencies Required: -* ``mne`` (>=1.7) -* ``numpy`` (>=1.21.2) -* ``scipy`` (>=1.7.1) +* ``mne`` (>=1.8) +* ``numpy`` (>=1.23) +* ``scipy`` (>=1.9) Optional: @@ -22,7 +22,7 @@ Optional: * ``pybv`` (>=0.7.5, for writing BrainVision data) * ``eeglabio`` (>=0.0.2, for writing EEGLAB data) * ``pymatreader`` (for other operations with EEGLAB data) -* ``matplotlib`` (>=3.5.0, for using the interactive data inspector) +* ``matplotlib`` (>=3.6, for using the interactive data inspector) * ``pandas`` (>=1.3.2, for generating event statistics) * ``edfio`` (>=0.2.1, for writing EDF data) * ``defusedxml`` (for writing reading EGI MFF data and BrainVision montages) diff --git a/doc/whats_new.rst b/doc/whats_new.rst index d4ad39cb9..5bf145c15 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -42,7 +42,7 @@ Detailed list of changes 🛠 Requirements ^^^^^^^^^^^^^^^ -- Nothing yet +- MNE-BIDS now requires ``mne`` 1.8 or higher. 🪲 Bug fixes ^^^^^^^^^^^^ diff --git a/mne_bids/tests/test_write.py b/mne_bids/tests/test_write.py index 623c869d3..f57abb6df 100644 --- a/mne_bids/tests/test_write.py +++ b/mne_bids/tests/test_write.py @@ -7,7 +7,6 @@ # SPDX-License-Identifier: BSD-3-Clause import codecs -import inspect import json import os import os.path as op @@ -103,7 +102,7 @@ def _wrap_read_raw(read_raw): def fn(fname, *args, **kwargs): - if Path(fname).suffix == ".mff" and check_version("mne", "1.8"): + if Path(fname).suffix == ".mff": kwargs["events_as_annotations"] = True raw = read_raw(fname, *args, **kwargs) raw.info["line_freq"] = 60 @@ -226,8 +225,7 @@ def test_write_participants(_bids_validate, tmp_path): # add fake participants data raw.set_meas_date(datetime(year=1994, month=1, day=26, tzinfo=timezone.utc)) birthday = (1993, 1, 26) - if check_version("mne", "1.8"): - birthday = date(*birthday) + birthday = date(*birthday) raw.info["subject_info"] = { "his_id": subject_id2, "birthday": birthday, @@ -636,9 +634,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.8 is dropped - if "copy" in inspect.getfullargspec(epochs.get_data).kwonlyargs: - kwargs["copy"] = False + kwargs["copy"] = False assert_array_almost_equal( epochs.get_data(**kwargs), epochs2.get_data(**kwargs), @@ -727,8 +723,7 @@ def test_fif(_bids_validate, tmp_path): # change the gender but don't force overwrite. raw = _read_raw_fif(raw_fname) birthday = (1994, 1, 26) - if check_version("mne", "1.8"): - birthday = date(*birthday) + birthday = date(*birthday) raw.info["subject_info"] = { "his_id": subject_id2, "birthday": birthday, diff --git a/mne_bids/write.py b/mne_bids/write.py index ec4ace2e2..80c25ceea 100644 --- a/mne_bids/write.py +++ b/mne_bids/write.py @@ -11,7 +11,7 @@ import sys import warnings from collections import OrderedDict, defaultdict -from datetime import date, datetime, timedelta, timezone +from datetime import datetime, timedelta, timezone from pathlib import Path import mne @@ -479,8 +479,6 @@ 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): # 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): meas_date = meas_date[0] diff --git a/pyproject.toml b/pyproject.toml index a44165931..4c08bd5a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Topic :: Scientific/Engineering", "Topic :: Software Development", ] -dependencies = ["mne>=1.7", "numpy>=1.21.2", "scipy>=1.7.1"] +dependencies = ["mne>=1.8", "numpy>=1.23", "scipy>=1.9"] description = "MNE-BIDS: Organizing MEG, EEG, and iEEG data according to the BIDS specification and facilitating their analysis with MNE-Python" dynamic = ["version"] keywords = [ @@ -64,14 +64,14 @@ full = [ "defusedxml", # For reading EGI MFF data and BrainVision montages "edfio >= 0.2.1", "eeglabio >= 0.0.2", - "matplotlib >= 3.5.0", + "matplotlib >= 3.6", "nibabel >= 3.2.1", "pandas >= 1.3.2", "pybv >= 0.7.5", "pymatreader", ] # Dependencies for running the test infrastructure -test = ["mne_bids[full]", "pytest >= 8", "pytest-cov", "pytest-sugar", "ruff"] +test = ["mne_bids[full]", "pytest", "pytest-cov", "pytest-sugar", "ruff"] [project.urls] "Bug Tracker" = "https://github.com/mne-tools/mne-bids/issues/"