Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Fix CIs #164

Merged
merged 6 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0./",
"https://dipy.org/documentation/1.4.0./objects.inv/",
),
"dipy": ("https://docs.dipy.org/1.8.0/", None),
}
intersphinx_timeout = 5

Expand Down
38 changes: 32 additions & 6 deletions mne_connectivity/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,38 @@
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
Expand Down Expand Up @@ -153,12 +185,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.")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ style = [
'yamllint',
]
test = [
"pytest-timeout",
'joblib',
'mne-bids',
'mne-connectivity[gui]',
Expand All @@ -112,7 +113,6 @@ test = [
'pytest',
'pytest-cov',
'statsmodels',
"pytest-timeout",
]

[project.urls]
Expand Down