diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ea9ecd5..b0b18240 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,10 +34,6 @@ jobs: - uses: actions/checkout@v4 - uses: mamba-org/setup-micromamba@v1 with: - condarc: | - channels: - - conda-forge - channel_priority: strict environment-file: environment.yml - run: ./tools/extract_version.sh - run: ./tools/macos_install_certificates.sh @@ -85,10 +81,6 @@ jobs: - uses: actions/checkout@v4 - uses: mamba-org/setup-micromamba@v1 with: - condarc: | - channels: - - conda-forge - channel_priority: strict environment-file: environment.yml - run: ./tools/extract_version.sh - run: ./tools/run_constructor.sh @@ -113,10 +105,6 @@ jobs: - uses: actions/checkout@v4 - uses: mamba-org/setup-micromamba@v1 with: - condarc: | - channels: - - conda-forge - channel_priority: strict environment-file: environment.yml - run: ./tools/extract_version.sh - run: ./tools/run_constructor.sh @@ -232,6 +220,7 @@ jobs: qt: true pyvista: false - run: ./tools/check_installation.sh + timeout-minutes: 5 # < 2 min even on Windows # Release release: diff --git a/recipes/mne-python/construct.yaml b/recipes/mne-python/construct.yaml index 9954e88a..726a421c 100644 --- a/recipes/mne-python/construct.yaml +++ b/recipes/mne-python/construct.yaml @@ -58,54 +58,60 @@ channels: specs: # Python - - python =3.12.2 + - python =3.12.4 - pip =24.0 - conda =24.5.0 - mamba =1.5.8 - - fmt =10.2.1 # MNE ecosystem # TODO: ⛔️ ⛔️ ⛔️ DEV BUILDS START: CHANGE BEFORE RELEASE! ⛔️ ⛔️ ⛔️ - # - mne =1.4dev0=*_20230503 + # - mne-base =1.4dev0=*_20230503 # - mne-installer-menus =1.4dev0=*_20230503 # - mne-bids =0.11dev0=*_20221007 # TODO: ⛔️ ⛔️ ⛔️ DEV BUILDS STOP: CHANGE BEFORE RELEASE! ⛔️ ⛔️ ⛔️ - - mne =1.7.1=*_0 + - mne =1.7.1=pyside6_*_102 - mne-installer-menus =1.7.1=*_0 # For testing purposes with build_local.sh, you can comment out all deps # below for speed, and change mne to mne-base above - mne-bids =0.15.0 - mne-bids-pipeline =1.9.0 - mne-qt-browser =0.6.3 - - mne-connectivity =0.7.0 + - mne-connectivity =0.7.0=*_1 - mne-faster =1.2 - mne-nirs =0.6.0 - mne-features =0.3 - mne-rsa =0.9.1 - mne-ari =0.1.2 - - mne-kit-gui =1.2.0 - - mayavi =4.8.2 - mne-icalabel =0.6.0 - - mne-gui-addons =0.1.0 + - mne-gui-addons =0.1=*_1 - mne-lsl =1.4.0 - - traitsui =8.0.0 - autoreject =0.4.3 + - mne-kit-gui =1.2.0=*_2 + - mayavi =4.8.2=pyside6_* + - traitsui =8.0.0 + - pyface =8.0.0=*_1 - pyriemann =0.6 - - pyprep =0.4.3 + - pyprep =0.4.3=*_1 + - pybv =0.7.5 + - eeglabio =0.0.2.post4 + - imageio-ffmpeg =0.5.1 + - mffpy =0.9.0 - openmeeg =2.5.11 - python-neo =0.13.1 - pandas =2.2.2 - # BLAS - - scipy =1.13.1 + - polars =1.1.0 + - scipy =1.14.0 - openblas =0.3.27 - libblas =3.9.0=*openblas - jupyter =1.0.0 - jupyterlab =4.2.3 - ipykernel =6.29.5 - spyder-kernels =2.5.2 - - spyder =5.5.5 + # TODO: Needs to not require pyqt + # https://github.com/spyder-ide/spyder/issues/20201 + # spyder =5.5.5 - darkdetect =0.8.0 - qdarkstyle =3.2.3 - - numba =0.59.1 + - numba =0.60.0 - cython =3.0.10 # I/O - pyxdf =1.16.6 @@ -132,42 +138,43 @@ specs: - openneuro-py =2024.2.0 # sleep staging - sleepecg =0.5.8 - - yasa =0.6.4 + - yasa =0.6.5 # various biological signals (ECG, EOG, EMG, …) - neurokit2 =0.2.9 - # GitHub client, https://cli.github.com - - gh =2.52.0 + - mnelab =0.9.1 # NeuroSpin needs the following - questionary =2.0.1 - pqdm =0.2.0 # Viz - - matplotlib =3.9.0 + # matplotilb is just matplotlib-base, tornado, and pyqt + # https://github.com/conda-forge/matplotlib-feedstock/blob/main/recipe/meta.yaml + - matplotlib-base =3.8.4 + - tornado =6.4.1 + - pyside6 =6.7.2=*_1 + - qt6-main =6.7.2 - ipympl =0.9.4 + - qtpy =2.4.1 - seaborn =0.13.2 - plotly =5.22.0 - - vtk =9.2.6 - - git =2.45.2 # [win] - - make =4.3 # [win] + - vtk =9.3.0=qt* - ipywidgets =8.1.3 - - pyvista =0.43.10 + - pyvista =0.44.0 - pyvistaqt =0.11.1 - trame =3.6.3 - trame-vtk =2.8.9 - - trame-vuetify =2.6.0 + - trame-vuetify =2.6.1 - termcolor =2.4.0 - - pyobjc-core =10.3.1 # [osx] - - pyobjc-framework-Cocoa =10.3.1 # [osx] - - pyobjc-framework-FSEvents =10.3.1 # [osx] - defusedxml =0.7.1 # Development + - gh =2.52.0 - setuptools_scm =8.1.0 - pytest =8.2.2 - pytest-cov =5.0.0 - pytest-qt =4.4.0 - pytest-timeout =2.3.1 - pre-commit =3.7.1 - - ruff =0.5.0 - - uv =0.2.18 + - ruff =0.5.1 + - uv =0.2.23 - check-manifest =0.49.0 - codespell =2.3.0 - nitime =0.10.2 @@ -183,17 +190,22 @@ specs: # Doc building - numpydoc =1.7.0 - pydata-sphinx-theme =0.15.4 - - graphviz =9.0.0 + - graphviz =11.0.0 - python-graphviz =0.20.3 - selenium =4.22.0 - - sphinx =7.2.6 + - sphinx =7.3.7 - sphinx-design =0.6.0 - sphinx-gallery =0.16.0 - sphinxcontrib-bibtex =2.6.2 - sphinx-copybutton =0.5.2 - sphinxcontrib-youtube =1.4.1 - intersphinx-registry =0.2406.4 - + # OS-specific + - git =2.45.2 # [win] + - make =4.3 # [win] + - pyobjc-core =10.3.1 # [osx] + - pyobjc-framework-Cocoa =10.3.1 # [osx] + - pyobjc-framework-FSEvents =10.3.1 # [osx] condarc: channels: - conda-forge diff --git a/tests/test_dev_installed.py b/tests/test_dev_installed.py index b0806fe7..661ac7a1 100644 --- a/tests/test_dev_installed.py +++ b/tests/test_dev_installed.py @@ -27,6 +27,7 @@ if not re.match("mne-[0-9]+", dep) # conda still on PyQt5 and not dep.startswith("PyQt6") + and not dep.startswith("sip-") # and not on conda-forge yet and not dep.startswith("sphinxcontrib-towncrier") and not dep.startswith("pytest-8") # dev requires pytest >= 8.0 but stable uses < 8 diff --git a/tests/test_gui.py b/tests/test_gui.py index b0d42735..9329b277 100644 --- a/tests/test_gui.py +++ b/tests/test_gui.py @@ -40,8 +40,8 @@ plotter.screenshot(fname) assert fname.is_file() os.remove(fname) - mne.viz.close_3d_figure(fig) assert "BackgroundPlotter" in repr(plotter), repr(plotter) + mne.viz.close_3d_figure(fig) # mne-qt-browser print("Running mne-qt-browser tests") @@ -56,9 +56,10 @@ from pyface.api import GUI # noqa import mne_kit_gui # noqa -os.environ["_MNE_GUI_TESTING_MODE"] = "true" -gui = GUI() -gui.process_events() -ui, frame = mne_kit_gui.kit2fiff() -assert not frame.model.can_save -ui.dispose() +if sys.platform != "darwin": # can be problematic on qt6 on macOS + os.environ["_MNE_GUI_TESTING_MODE"] = "true" + gui = GUI() + gui.process_events() + ui, frame = mne_kit_gui.kit2fiff() + assert not frame.model.can_save + ui.dispose() diff --git a/tests/test_imports.py b/tests/test_imports.py index ace96181..fe90d431 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -58,6 +58,12 @@ def check_min_version(package, min_version): import pqdm import pyvistaqt import vtk +import PySide6.QtCore + +import matplotlib.pyplot as plt + +backend = plt.get_backend() +assert backend == "QtAgg", backend check_min_version(pyvistaqt, "0.11.0") diff --git a/tests/test_json_versions.py b/tests/test_json_versions.py index 1aaacf7e..d85f8ef8 100644 --- a/tests/test_json_versions.py +++ b/tests/test_json_versions.py @@ -1,5 +1,6 @@ # Read the JSON and YAML and make sure the version + build match +import fnmatch import json import os import pathlib @@ -34,22 +35,20 @@ del params # Extract versions from construct.yaml -mne_package_names = ("mne", "mne-installer-menus") # the most important ones! want_versions = {} - for spec in specs: - if " " not in spec: # only include those where we specify a version + if " =" not in spec or spec.count("=") < 2: continue package_name, package_version_and_build = spec.split(" ") - if package_name in mne_package_names: - package_version = package_version_and_build.split("=")[1] - package_build = ( - package_version_and_build.split("=")[-1].replace("*", "").replace("_", "") - ) - want_versions[package_name] = { - "version": package_version, - "build_number": package_build, - } + package_version = package_version_and_build.split("=")[1] + package_build = package_version_and_build.split("=")[-1] + want_versions[package_name] = { + "version": package_version, + "build_string": package_build, + } +for name in ("mne", "mne-installer-menus"): # the most important ones! + assert name in want_versions, f"{name} missing from want_versions (build str error)" +assert len(want_versions) > 2, len(want_versions) # more than just the two above # Extract versions from created environment fname = dir_ / f"MNE-Python-{installer_version}-{sys_name}{sys_ext}.env.json" @@ -57,17 +56,14 @@ env_json = json.loads(fname.read_text(encoding="utf-8")) got_versions = dict() for package in env_json: - if package["name"] in mne_package_names: - got_versions[package["name"]] = { - "version": str(package["version"]), - "build_number": str(package["build_number"]), - } -assert len(got_versions) == 2, got_versions + got_versions[package["name"]] = { + "version": str(package["version"]), + "build_string": str(package["build_string"]), + } # check versions -for package_name in mne_package_names: +for package_name, want in want_versions.items(): got = got_versions[package_name] - want = want_versions[package_name] - msg = f"{package_name}: got {repr(got)} != want {repr(want)}" - assert got == want, msg + assert got["version"] == want["version"], msg + assert fnmatch.fnmatch(got["build_string"], want["build_string"]), msg diff --git a/tests/test_outdated.py b/tests/test_outdated.py index 60665b19..2a806557 100644 --- a/tests/test_outdated.py +++ b/tests/test_outdated.py @@ -39,13 +39,8 @@ class Package: # noqa: D101 allowed_outdated: set[str] = { - "python", # 3.12.3 needs libexpat >2.6 but VTK not happy about it - "sphinx", # 7.3 compat in progress - "graphviz", # conflicts with VTK 9.2.6 via libexpat - "vtk", # 9.3.0 is out but mayavi (at least) hasn't been migrated - "numba", # conflicts with VTK 9.2.6 - # https://github.com/raphaelvallat/yasa/pull/171 - "scipy", # 1.14 drops a function used by yasa + "matplotlib", # 3.9.0 is just in RC + "vtk", # 9.3.1 is out but mayavi needs to be updated } packages: list[Package] = []