From f56adc7c28002838e809bb9f667fbb0eee68e2a7 Mon Sep 17 00:00:00 2001 From: Adam Li Date: Fri, 15 Dec 2023 11:13:40 -0600 Subject: [PATCH 1/6] Fix CIs Signed-off-by: Adam Li --- mne_connectivity/conftest.py | 37 ++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/mne_connectivity/conftest.py b/mne_connectivity/conftest.py index 4f22a3d9..838394be 100644 --- a/mne_connectivity/conftest.py +++ b/mne_connectivity/conftest.py @@ -12,6 +12,37 @@ from mne.utils import _check_qt_version +def has_pyvista(): + """Check that PyVista is installed.""" + try: + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + import pyvista # noqa: F401 + return True + except ImportError: + return False + + +def has_pyvistaqt(): + """Check that PyVistaQt is installed.""" + try: + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + import pyvistaqt # noqa: F401 + return True + except ImportError: + return False + + +def has_imageio_ffmpeg(): + """Check if imageio-ffmpeg is installed.""" + try: + import imageio_ffmpeg # noqa: F401 + + return True + except ImportError: + return False + def pytest_configure(config): """Configure pytest options.""" # Fixtures @@ -153,12 +184,6 @@ def _use_backend(backend_name, interactive): def _check_skip_backend(name): - from mne.viz.backends.tests._utils import ( - has_imageio_ffmpeg, - has_pyvista, - has_pyvistaqt, - ) - if name in ("pyvistaqt", "notebook"): if not has_pyvista(): pytest.skip("Test skipped, requires pyvista.") From 026dcf84ac04bc76e502914c4e1cf5ec1bd6ce29 Mon Sep 17 00:00:00 2001 From: Adam Li Date: Fri, 15 Dec 2023 11:14:17 -0600 Subject: [PATCH 2/6] Run precommit Signed-off-by: Adam Li --- mne_connectivity/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mne_connectivity/conftest.py b/mne_connectivity/conftest.py index 838394be..63e754e1 100644 --- a/mne_connectivity/conftest.py +++ b/mne_connectivity/conftest.py @@ -43,6 +43,7 @@ def has_imageio_ffmpeg(): except ImportError: return False + def pytest_configure(config): """Configure pytest options.""" # Fixtures From 21354b010c13f85831dc5e6413aef25f2e17a6ba Mon Sep 17 00:00:00 2001 From: Adam Li Date: Fri, 15 Dec 2023 11:27:36 -0600 Subject: [PATCH 3/6] Fix pyrpoject toml Signed-off-by: Adam Li --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 45207f68..ca5840c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,7 @@ style = [ 'yamllint', ] test = [ + "pytest-timeout", 'joblib', 'mne-bids', 'mne-connectivity[gui]', @@ -112,7 +113,6 @@ test = [ 'pytest', 'pytest-cov', 'statsmodels', - "pytest-timeout", ] [project.urls] From fd77acc6f8955e95f48376ec31aa44f9b06432f5 Mon Sep 17 00:00:00 2001 From: Adam Li Date: Fri, 15 Dec 2023 11:49:03 -0600 Subject: [PATCH 4/6] Updgradde Signed-off-by: Adam Li --- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 076557a3..d7f748c9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -290,8 +290,8 @@ "nibabel": ("https://nipy.org/nibabel", None), "nilearn": ("http://nilearn.github.io/stable", None), "dipy": ( - "https://dipy.org/documentation/1.4.0./", - "https://dipy.org/documentation/1.4.0./objects.inv/", + "https://dipy.org/documentation/1.7.0./", + "https://dipy.org/documentation/1.7.0./objects.inv/", ), } intersphinx_timeout = 5 From a78987db65962bf9c412c498a407593faedcf3e4 Mon Sep 17 00:00:00 2001 From: Adam Li Date: Fri, 15 Dec 2023 12:07:51 -0600 Subject: [PATCH 5/6] Fix dipy Signed-off-by: Adam Li --- doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index d7f748c9..27a92077 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -290,8 +290,8 @@ "nibabel": ("https://nipy.org/nibabel", None), "nilearn": ("http://nilearn.github.io/stable", None), "dipy": ( - "https://dipy.org/documentation/1.7.0./", - "https://dipy.org/documentation/1.7.0./objects.inv/", + "https://dipy.org/documentation/1.7.0/", + "https://dipy.org/documentation/1.7.0/objects.inv/", ), } intersphinx_timeout = 5 From c9d1b8eeb28efea5a08fe45eaec9eefad3c01e0c Mon Sep 17 00:00:00 2001 From: Adam Li Date: Fri, 15 Dec 2023 12:14:03 -0600 Subject: [PATCH 6/6] Fix links Signed-off-by: Adam Li --- doc/conf.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 27a92077..6c7b5b35 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -289,10 +289,7 @@ "joblib": ("https://joblib.readthedocs.io/en/latest", None), "nibabel": ("https://nipy.org/nibabel", None), "nilearn": ("http://nilearn.github.io/stable", None), - "dipy": ( - "https://dipy.org/documentation/1.7.0/", - "https://dipy.org/documentation/1.7.0/objects.inv/", - ), + "dipy": ("https://docs.dipy.org/1.8.0/", None), } intersphinx_timeout = 5