From 9a41dff7ad700d4777309a4aa17a5a4d9b1661c6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:11:30 +0000 Subject: [PATCH 1/7] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.14.9 → v0.14.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.9...v0.14.10) - [github.com/woodruffw/zizmor-pre-commit: v1.18.0 → v1.19.0](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.18.0...v1.19.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ca5e30ec1c..a368667feaf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: # Ruff mne - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.9 + rev: v0.14.10 hooks: - id: ruff-check name: ruff lint mne @@ -82,7 +82,7 @@ repos: # zizmor - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.18.0 + rev: v1.19.0 hooks: - id: zizmor args: [--fix] From fabf49b062ae9f5703cbacba8b5f283673f075ed Mon Sep 17 00:00:00 2001 From: "mne[bot]" <50266005+mne-bot@users.noreply.github.com> Date: Mon, 22 Dec 2025 20:11:56 +0000 Subject: [PATCH 2/7] mne[bot] Push commit to run CircleCI From 5f4152ebed40af9ccb798872be286d518b9ac595 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 23 Dec 2025 09:42:12 -0500 Subject: [PATCH 3/7] FIX: Try --- mne/surface.py | 8 +++++++- tools/github_actions_dependencies.sh | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mne/surface.py b/mne/surface.py index a84ae5e043b..de54a0b949d 100644 --- a/mne/surface.py +++ b/mne/surface.py @@ -803,7 +803,13 @@ def query(self, rr): def _call_pyvista(self, rr): pdata = _surface_to_polydata(dict(rr=rr)) - out = pdata.select_enclosed_points(self.pdata, check_surface=False) + # PyVista 0.47+ + meth = ( + self.pdata.select_interior_points + if hasattr(self.pdata, "select_interior_points") + else self.pdata.select_enclosed_points + ) + out = meth(pdata, check_surface=False) return out["SelectedPoints"].astype(bool) def _call_old(self, rr, n_jobs): diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index f9a60080f4b..ffe75afca44 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -38,6 +38,8 @@ else EXTRAS="" fi echo "" +# until quantities releases... +STD_ARGS="$STD_ARGS git+https://github.com/python-quantities/python-quantities" echo "::group::Installing test dependencies using pip" set -x From 86dc904989d759266c2fac4534b6e52df4ceba99 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 23 Dec 2025 16:15:32 -0500 Subject: [PATCH 4/7] FIX: More --- doc/sphinxext/related_software.py | 5 +++++ mne/surface.py | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/sphinxext/related_software.py b/doc/sphinxext/related_software.py index d810937b1e5..f0b6eef649c 100644 --- a/doc/sphinxext/related_software.py +++ b/doc/sphinxext/related_software.py @@ -51,6 +51,11 @@ "Home-page": "https://users.aalto.fi/~vanvlm1/posthoc/python", "Summary": "post-hoc modification of linear models", }, + # https://github.com/freesurfer/surfa/pull/66 + "surfa": { + "Home-page": "https://github.com/freesurfer/surfa", + "Summary": "Utilities for medical image and surface processing.", + }, # This package does not provide wheels, so don't force CircleCI to build it. # If it eventually provides binary wheels we could add it to # `tools/circleci_dependencies.sh` and remove from here. diff --git a/mne/surface.py b/mne/surface.py index de54a0b949d..284f3ef4728 100644 --- a/mne/surface.py +++ b/mne/surface.py @@ -805,11 +805,11 @@ def _call_pyvista(self, rr): pdata = _surface_to_polydata(dict(rr=rr)) # PyVista 0.47+ meth = ( - self.pdata.select_interior_points - if hasattr(self.pdata, "select_interior_points") - else self.pdata.select_enclosed_points + pdata.select_interior_points + if hasattr(pdata, "select_interior_points") + else pdata.select_enclosed_points ) - out = meth(pdata, check_surface=False) + out = meth(self.pdata, check_surface=False) return out["SelectedPoints"].astype(bool) def _call_old(self, rr, n_jobs): From b6b4c25849bbe83bbbeee7cfe9fe3ecbeb17d122 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 23 Dec 2025 16:34:45 -0500 Subject: [PATCH 5/7] FIX: Azures --- azure-pipelines.yml | 4 ++-- tools/azure_dependencies.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 474cdf326aa..e83c8db3dae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -114,7 +114,7 @@ stages: - bash: | set -e python -m pip install --progress-bar off --upgrade pip - python -m pip install --progress-bar off "mne-qt-browser[opengl] @ git+https://github.com/mne-tools/mne-qt-browser.git" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1,!=6.8.1.1,!=6.9.1" pandas neo pymatreader antio defusedxml curryreader + python -m pip install --progress-bar off "mne-qt-browser[opengl] @ git+https://github.com/mne-tools/mne-qt-browser.git" "git+https://github.com/python-quantities/python-quantities" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1,!=6.8.1.1,!=6.9.1" pandas neo pymatreader antio defusedxml curryreader python -m pip uninstall -yq mne python -m pip install --progress-bar off --upgrade -e . --group=test displayName: 'Install dependencies with pip' @@ -173,7 +173,7 @@ stages: python -m pip install --progress-bar off --upgrade pip python -m pip install --progress-bar off --upgrade --pre --only-binary=\"numpy,scipy,matplotlib,vtk\" numpy scipy matplotlib vtk python -c "import vtk" - python -m pip install --progress-bar off --upgrade -ve .[full] --group=test_extra + python -m pip install --progress-bar off --upgrade -ve .[full] --group=test_extra "git+https://github.com/python-quantities/python-quantities" displayName: 'Install dependencies with pip' - bash: | set -e diff --git a/tools/azure_dependencies.sh b/tools/azure_dependencies.sh index 719df838af2..bb1f2968e2f 100755 --- a/tools/azure_dependencies.sh +++ b/tools/azure_dependencies.sh @@ -2,10 +2,10 @@ set -eo pipefail SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -STD_ARGS="--progress-bar off --upgrade" +STD_ARGS="--progress-bar off --upgrade " python -m pip install $STD_ARGS pip setuptools wheel if [ "${TEST_MODE}" == "pip" ]; then - python -m pip install $STD_ARGS --only-binary="numba,llvmlite,numpy,scipy,vtk,dipy,openmeeg" -e .[full] --group=test + python -m pip install $STD_ARGS --only-binary="numba,llvmlite,numpy,scipy,vtk,dipy,openmeeg" -e .[full] --group=test git+https://github.com/python-quantities/python-quantities elif [ "${TEST_MODE}" == "pip-pre" ]; then ${SCRIPT_DIR}/install_pre_requirements.sh python -m pip install $STD_ARGS --pre -e . --group=test_extra From 7b05e3bf6bc26451eeac6cfd7faf4881be35ae1c Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 23 Dec 2025 17:50:45 -0500 Subject: [PATCH 6/7] FIX: Better --- mne/surface.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/mne/surface.py b/mne/surface.py index 284f3ef4728..06bc030c8ad 100644 --- a/mne/surface.py +++ b/mne/surface.py @@ -803,14 +803,15 @@ def query(self, rr): def _call_pyvista(self, rr): pdata = _surface_to_polydata(dict(rr=rr)) - # PyVista 0.47+ - meth = ( - pdata.select_interior_points - if hasattr(pdata, "select_interior_points") - else pdata.select_enclosed_points - ) + # TODO VERSION PyVista 0.47+ + if hasattr(pdata, "select_interior_points"): + meth = pdata.select_interior_points + key = "selected_points" + else: + meth = pdata.select_enclosed_points + key = "SelectedPoints" out = meth(self.pdata, check_surface=False) - return out["SelectedPoints"].astype(bool) + return out[key].astype(bool) def _call_old(self, rr, n_jobs): n_orig = len(rr) From 13360b9c7a028c7d8f832c5dca2a3f3013359c31 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Tue, 23 Dec 2025 19:44:32 -0500 Subject: [PATCH 7/7] FIX: Click inbounds --- mne/viz/tests/test_3d_mpl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mne/viz/tests/test_3d_mpl.py b/mne/viz/tests/test_3d_mpl.py index ed9e51df972..35c495a7f93 100644 --- a/mne/viz/tests/test_3d_mpl.py +++ b/mne/viz/tests/test_3d_mpl.py @@ -86,7 +86,7 @@ def test_plot_volume_source_estimates_basic( want_str = f"({want_p[0]:0.1f}, {want_p[1]:0.1f}, {want_p[2]:0.1f}) mm" assert want_str in log, (want_str, init_p) for ax_idx in [0, 2, 3, 4]: - _fake_click(fig, fig.axes[ax_idx], (0.3, 0.5)) + _fake_click(fig, fig.axes[ax_idx], (0.5, 0.5)) _fake_keypress(fig, "left") _fake_keypress(fig, "shift+right") if bg_img is not None: