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] 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/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 a84ae5e043b..06bc030c8ad 100644 --- a/mne/surface.py +++ b/mne/surface.py @@ -803,8 +803,15 @@ 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) - return out["SelectedPoints"].astype(bool) + # 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[key].astype(bool) def _call_old(self, rr, n_jobs): n_orig = len(rr) 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: 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 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