[med-svn] [Git][med-team/python-mne][upstream] New upstream version 1.7.1

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Thu Jun 20 22:28:48 BST 2024



Étienne Mollier pushed to branch upstream at Debian Med / python-mne


Commits:
a9797732 by Étienne Mollier at 2024-06-20T22:23:03+02:00
New upstream version 1.7.1
- - - - -


17 changed files:

- .circleci/config.yml
- .git_archival.txt
- .github/workflows/release.yml
- CITATION.cff
- azure-pipelines.yml
- codemeta.json
- doc/changes/v1.7.rst
- doc/conf.py
- doc/install/installers.rst
- mne/conftest.py
- mne/io/edf/edf.py
- mne/io/edf/tests/test_edf.py
- mne/io/fiff/tests/test_raw_fiff.py
- mne/time_frequency/csd.py
- mne/time_frequency/tests/test_csd.py
- pyproject.toml
- tools/generate_codemeta.py


Changes:

=====================================
.circleci/config.yml
=====================================
@@ -522,23 +522,23 @@ workflows:
                 - main
                 - /maint\/.*/
 
-  main:
+  stable:
     jobs:
       - build_docs:
           scheduled: "true"
-          name: build_docs_main
+          name: build_docs_stable
       - deploy:
-          name: deploy_main
+          name: deploy_stable
           requires:
-            - build_docs_main
+            - build_docs_stable
     triggers:
       - schedule:
-          # "At 6:00 AM GMT every day"
-          cron: "0 6 * * *"
+          # "At 4:00 AM GMT every day"
+          cron: "0 4 * * *"
           filters:
             branches:
               only:
-                - main
+                - /maint\/.*/
 
   monthly:
     jobs:


=====================================
.git_archival.txt
=====================================
@@ -1,4 +1,4 @@
-node: 39a4ddb81cb6e7218f770d34f0ae93e5987258bb
-node-date: 2024-04-19T13:59:32-04:00
-describe-name: v1.7.0
-ref-names: tag: v1.7.0
+node: 663d7417fcf498f87c960e656672558f7efed698
+node-date: 2024-06-14T16:54:31-04:00
+describe-name: v1.7.1
+ref-names: tag: v1.7.1


=====================================
.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


=====================================
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


=====================================
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}


=====================================
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",


=====================================
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 <https://github.com/mne-tools/mne-python/pulls/12633>`__)
+- Fix incorrect RuntimeWarning (different channel filter settings) in EDF/BDF import, by `Clemens Brunner`_. (`#12661 <https://github.com/mne-tools/mne-python/pulls/12661>`__)
+
+Authors
+-------
+
+* Clemens Brunner
+* Thomas Binns
+
 .. _changes_1_7_0:
 
 1.7.0 (2024-04-19)


=====================================
doc/conf.py
=====================================
@@ -1362,6 +1362,11 @@ def reset_warnings(gallery_conf, fname):
         r"DataFrameGroupBy\.apply operated on the grouping columns.*",
         # pandas
         r"\nPyarrow will become a required dependency of pandas.*",
+        # matplotlib
+        "The 'labels' parameter of boxplot.*",
+        "vert: bool was deprecated in.*",
+        # bibtex latexcodec
+        "open_text is deprecated.*",
     ):
         warnings.filterwarnings(  # deal with other modules having bad imports
             "ignore", message=".*%s.*" % key, category=DeprecationWarning
@@ -1401,6 +1406,7 @@ def reset_warnings(gallery_conf, fname):
         "is_categorical_dtype is deprecated.*",
         "The default of observed=False.*",
         "When grouping with a length-1 list-like.*",
+        "'multi_class' was deprecated in version.*",
     ):
         warnings.filterwarnings(
             "ignore",


=====================================
doc/install/installers.rst
=====================================
@@ -15,7 +15,7 @@ Got any questions? Let us know on the `MNE Forum`_!
         :class-content: text-center
         :name: linux-installers
 
-        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.6.1/MNE-Python-1.6.1_0-Linux.sh
+        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.0/MNE-Python-1.7.0_0-Linux.sh
             :ref-type: ref
             :color: primary
             :shadow:
@@ -29,14 +29,14 @@ Got any questions? Let us know on the `MNE Forum`_!
 
         .. code-block:: console
 
-            $ sh ./MNE-Python-1.6.1_0-Linux.sh
+            $ sh ./MNE-Python-1.7.0_0-Linux.sh
 
 
     .. tab-item:: macOS (Intel)
         :class-content: text-center
         :name: macos-intel-installers
 
-        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.6.1/MNE-Python-1.6.1_0-macOS_Intel.pkg
+        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.0/MNE-Python-1.7.0_0-macOS_Intel.pkg
             :ref-type: ref
             :color: primary
             :shadow:
@@ -52,7 +52,7 @@ Got any questions? Let us know on the `MNE Forum`_!
         :class-content: text-center
         :name: macos-apple-installers
 
-        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.6.1/MNE-Python-1.6.1_0-macOS_M1.pkg
+        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.0/MNE-Python-1.7.0_0-macOS_M1.pkg
             :ref-type: ref
             :color: primary
             :shadow:
@@ -68,7 +68,7 @@ Got any questions? Let us know on the `MNE Forum`_!
         :class-content: text-center
         :name: windows-installers
 
-        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.6.1/MNE-Python-1.6.1_0-Windows.exe
+        .. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.0/MNE-Python-1.7.0_0-Windows.exe
             :ref-type: ref
             :color: primary
             :shadow:
@@ -120,7 +120,7 @@ information, including a line that will read something like:
 
 .. code-block::
 
-   Using Python: /some/directory/mne-python_1.6.1_0/bin/python
+   Using Python: /some/directory/mne-python_1.7.0_0/bin/python
 
 This path is what you need to enter in VS Code when selecting the Python
 interpreter.


=====================================
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()


=====================================
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:


=====================================
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")


=====================================
mne/io/fiff/tests/test_raw_fiff.py
=====================================
@@ -60,7 +60,6 @@ ctf_comp_fname = base_dir / "test_ctf_comp_raw.fif"
 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):


=====================================
mne/time_frequency/csd.py
=====================================
@@ -810,9 +810,10 @@ def csd_array_fourier(
     n_fft = n_times if n_fft is None else n_fft
 
     # Preparing frequencies of interest
-    # orig_frequencies = fftfreq(n_fft, 1. / sfreq)
     orig_frequencies = rfftfreq(n_fft, 1.0 / sfreq)
-    freq_mask = (orig_frequencies > fmin) & (orig_frequencies < fmax)
+    freq_mask = (
+        (orig_frequencies > 0) & (orig_frequencies >= fmin) & (orig_frequencies <= fmax)
+    )
     frequencies = orig_frequencies[freq_mask]
 
     if len(frequencies) == 0:
@@ -1013,7 +1014,9 @@ def csd_array_multitaper(
 
     # Preparing frequencies of interest
     orig_frequencies = rfftfreq(n_fft, 1.0 / sfreq)
-    freq_mask = (orig_frequencies > fmin) & (orig_frequencies < fmax)
+    freq_mask = (
+        (orig_frequencies > 0) & (orig_frequencies >= fmin) & (orig_frequencies <= fmax)
+    )
     frequencies = orig_frequencies[freq_mask]
 
     if len(frequencies) == 0:


=====================================
mne/time_frequency/tests/test_csd.py
=====================================
@@ -394,15 +394,15 @@ def _test_fourier_multitaper_parameters(epochs, csd_epochs, csd_array):
         fmin=20,
         fmax=10,
     )
-    raises(ValueError, csd_epochs, epochs, fmin=20, fmax=20.1)
+    raises(ValueError, csd_epochs, epochs, fmin=20.11, fmax=20.19)
     raises(
         ValueError,
         csd_array,
         epochs._data,
         epochs.info["sfreq"],
         epochs.tmin,
-        fmin=20,
-        fmax=20.1,
+        fmin=20.11,
+        fmax=20.19,
     )
     raises(ValueError, csd_epochs, epochs, tmin=0.15, tmax=0.1)
     raises(


=====================================
pyproject.toml
=====================================
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
 [project]
 name = "mne"
 description = "MNE-Python project for MEG and EEG data analysis."
-dynamic = ["version"]
+version = "1.7.1"
 authors = [
     { name = "Alexandre Gramfort", email = "alexandre.gramfort at inria.fr" },
 ]


=====================================
tools/generate_codemeta.py
=====================================
@@ -98,7 +98,8 @@ assert len(split_version) == 3, msg
 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



View it on GitLab: https://salsa.debian.org/med-team/python-mne/-/commit/a9797732b0daf092b7e173015268caf946f04f66

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/med-team/python-mne/-/commit/a9797732b0daf092b7e173015268caf946f04f66
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240620/bf8dd1d6/attachment-0001.htm>


More information about the debian-med-commit mailing list