diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c9895e11919..a004ff9ea21 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,11 +5,9 @@ on: # yamllint disable-line rule:truthy release: types: [published] push: - branches: - - main + branches: ["main", "maint/*"] pull_request: - branches: - - main + branches: ["main", "maint/*"] permissions: contents: read diff --git a/CITATION.cff b/CITATION.cff index 936f3f90677..bea700c0427 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -1,9 +1,9 @@ cff-version: 1.2.0 title: "MNE-Python" message: "If you use this software, please cite both the software itself, and the paper listed in the preferred-citation field." -version: 1.7.0 -date-released: "2024-04-19" -commit: a3743420a8eef774dafd2908f0de89c4d37fcd01 +version: 1.7.1 +date-released: "2024-06-14" +commit: 7c00b56d077eaf6a2ca691eadd567d974865a03c doi: 10.5281/zenodo.592483 keywords: - MEG diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7e2fa2bd397..185453b3efa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -193,7 +193,7 @@ stages: displayName: 'PyQt6' - bash: | set -e - python -m pip install "PySide6!=6.7.0" + python -m pip install "PySide6!=6.7.0,!=6.7.1" mne sys_info -pd mne sys_info -pd | grep "qtpy .* (PySide6=.*)$" PYTEST_QT_API=PySide6 pytest -m "not slowtest" ${TEST_OPTIONS} diff --git a/codemeta.json b/codemeta.json index ebfe798c648..c7ec3537dbf 100644 --- a/codemeta.json +++ b/codemeta.json @@ -5,11 +5,11 @@ "codeRepository": "git+https://github.com/mne-tools/mne-python.git", "dateCreated": "2010-12-26", "datePublished": "2014-08-04", - "dateModified": "2024-04-19", - "downloadUrl": "https://github.com/mne-tools/mne-python/archive/v1.7.0.zip", + "dateModified": "2024-06-14", + "downloadUrl": "https://github.com/mne-tools/mne-python/archive/v1.7.1.zip", "issueTracker": "https://github.com/mne-tools/mne-python/issues", "name": "MNE-Python", - "version": "1.7.0", + "version": "1.7.1", "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, connectivity analysis, machine learning, and statistics.", "applicationCategory": "Neuroscience", "developmentStatus": "active", diff --git a/doc/changes/devel/12633.bugfix.rst b/doc/changes/devel/12633.bugfix.rst deleted file mode 100644 index dfc69bc2fe7..00000000000 --- a/doc/changes/devel/12633.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix bug where :func:`mne.time_frequency.csd_multitaper`, :func:`mne.time_frequency.csd_fourier`, :func:`mne.time_frequency.csd_array_multitaper`, and :func:`mne.time_frequency.csd_array_fourier` would return cross-spectral densities with the ``fmin`` and ``fmax`` frequencies missing, by `Thomas Binns`_ \ No newline at end of file diff --git a/doc/changes/v1.7.rst b/doc/changes/v1.7.rst index e8f8e2e8e7b..ae9d6fd7421 100644 --- a/doc/changes/v1.7.rst +++ b/doc/changes/v1.7.rst @@ -1,3 +1,20 @@ +.. _changes_1_7_1: + +1.7.1 (2024-06-14) +================== + +Bugfixes +-------- + +- Fix bug where :func:`mne.time_frequency.csd_multitaper`, :func:`mne.time_frequency.csd_fourier`, :func:`mne.time_frequency.csd_array_multitaper`, and :func:`mne.time_frequency.csd_array_fourier` would return cross-spectral densities with the ``fmin`` and ``fmax`` frequencies missing, by `Thomas Binns`_ (`#12633 `__) +- Fix incorrect RuntimeWarning (different channel filter settings) in EDF/BDF import, by `Clemens Brunner`_. (`#12661 `__) + +Authors +------- + +* Clemens Brunner +* Thomas Binns + .. _changes_1_7_0: 1.7.0 (2024-04-19) diff --git a/mne/conftest.py b/mne/conftest.py index 93657339b26..52bbb55eaff 100644 --- a/mne/conftest.py +++ b/mne/conftest.py @@ -200,6 +200,8 @@ def pytest_configure(config): ignore:np\.find_common_type is deprecated.*:DeprecationWarning # pyvista <-> NumPy 2.0 ignore:__array_wrap__ must accept context and return_scalar arguments.*:DeprecationWarning + # sklearn + ignore:'multi_class' was deprecated.*:FutureWarning """ # noqa: E501 for warning_line in warning_lines.split("\n"): warning_line = warning_line.strip() diff --git a/mne/io/edf/edf.py b/mne/io/edf/edf.py index 8a982f43e86..6816668d749 100644 --- a/mne/io/edf/edf.py +++ b/mne/io/edf/edf.py @@ -706,7 +706,7 @@ def _get_info( info["subject_info"]["weight"] = float(edf_info["subject_info"]["weight"]) # Filter settings - if filt_ch_idxs := [x for x in sel if x not in stim_channel_idxs]: + if filt_ch_idxs := [x for x in range(len(sel)) if x not in stim_channel_idxs]: _set_prefilter(info, edf_info, filt_ch_idxs, "highpass") _set_prefilter(info, edf_info, filt_ch_idxs, "lowpass") @@ -951,6 +951,7 @@ def _read_edf_header( edf_info["units"] = np.array(edf_info["units"], float) ch_names = [ch_names[idx] for idx in sel] + ch_types = [ch_types[idx] for idx in sel] units = [units[idx] for idx in sel] if not exclude_after_unique: diff --git a/mne/io/edf/tests/test_edf.py b/mne/io/edf/tests/test_edf.py index 7517693b6ea..0d510c04aae 100644 --- a/mne/io/edf/tests/test_edf.py +++ b/mne/io/edf/tests/test_edf.py @@ -175,26 +175,24 @@ def test_bdf_data(): # XXX BDF data for these is around 0.01 when it should be in the uV range, # probably some bug test_scaling = False - with pytest.warns(RuntimeWarning, match="Channels contain different"): - raw_py = _test_raw_reader( - read_raw_bdf, - input_fname=bdf_path, - eog=eog, - misc=misc, - exclude=["M2", "IEOG"], - test_scaling=test_scaling, - ) + raw_py = _test_raw_reader( + read_raw_bdf, + input_fname=bdf_path, + eog=eog, + misc=misc, + exclude=["M2", "IEOG"], + test_scaling=test_scaling, + ) assert len(raw_py.ch_names) == 71 - with pytest.warns(RuntimeWarning, match="Channels contain different"): - raw_py = _test_raw_reader( - read_raw_bdf, - input_fname=bdf_path, - montage="biosemi64", - eog=eog, - misc=misc, - exclude=["M2", "IEOG"], - test_scaling=test_scaling, - ) + raw_py = _test_raw_reader( + read_raw_bdf, + input_fname=bdf_path, + montage="biosemi64", + eog=eog, + misc=misc, + exclude=["M2", "IEOG"], + test_scaling=test_scaling, + ) assert len(raw_py.ch_names) == 71 assert "RawEDF" in repr(raw_py) picks = pick_types(raw_py.info, meg=False, eeg=True, exclude="bads") diff --git a/mne/io/fiff/tests/test_raw_fiff.py b/mne/io/fiff/tests/test_raw_fiff.py index dc3c732979d..b6abb73b926 100644 --- a/mne/io/fiff/tests/test_raw_fiff.py +++ b/mne/io/fiff/tests/test_raw_fiff.py @@ -60,7 +60,6 @@ fif_bad_marked_fname = base_dir / "test_withbads_raw.fif" bad_file_works = base_dir / "test_bads.txt" bad_file_wrong = base_dir / "test_wrong_bads.txt" -hp_fname = base_dir / "test_chpi_raw_hp.txt" hp_fif_fname = base_dir / "test_chpi_raw_sss.fif" @@ -695,12 +694,14 @@ def test_bids_split_files(tmp_path): with pytest.raises(ValueError, match="Passing a BIDSPath"): raw.save(bids_path, **save_kwargs) bids_path.split = None - want_paths = [Path(bids_path.copy().update(split=ii).fpath) for ii in range(1, 3)] + want_paths = [ + Path(bids_path.copy().update(split=f"{ii:02d}").fpath) for ii in range(1, 3) + ] for want_path in want_paths: assert not want_path.is_file() raw.save(bids_path, **save_kwargs) for want_path in want_paths: - assert want_path.is_file() + assert want_path.is_file(), want_path def _err(*args, **kwargs): diff --git a/pyproject.toml b/pyproject.toml index e6a5622c04f..635790ec182 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "mne" description = "MNE-Python project for MEG and EEG data analysis." -version = "1.7.0" +version = "1.7.1" authors = [ { name = "Alexandre Gramfort", email = "alexandre.gramfort@inria.fr" }, ] diff --git a/tools/generate_codemeta.py b/tools/generate_codemeta.py index a1c1fac77b4..079ea8f9c79 100644 --- a/tools/generate_codemeta.py +++ b/tools/generate_codemeta.py @@ -98,7 +98,8 @@ def parse_name(name): args = ["git", "shortlog", "-nse"] result = subprocess.run(args, capture_output=True, text=True) lines = result.stdout.strip().split("\n") -all_names = [parse_name(line) for line in lines if "[bot]" not in line] +exclude = ["[bot]", "Lumberbot (aka Jack)"] +all_names = [parse_name(line) for line in lines if not any(x in line for x in exclude)] # CONSTRUCT JSON AUTHORS LIST