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

ENH: Add mnelab, polars, update to vtk 9.3 and PySide6 #273

Merged
merged 39 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2f0b69b
MAINT: Try updating to vtk 9.3
larsoner Jun 19, 2024
d0477b6
[autofix.ci] apply automated fixes
autofix-ci[bot] Jun 19, 2024
9b12916
Merge remote-tracking branch 'upstream/main' into bump
larsoner Jun 25, 2024
1ceeff8
[autofix.ci] apply automated fixes
autofix-ci[bot] Jun 25, 2024
88f78c3
Merge remote-tracking branch 'upstream/main' into bump
larsoner Jun 25, 2024
e8830c8
Merge remote-tracking branch 'upstream/main' into bump
larsoner Jun 29, 2024
e9f95fa
FIX: Versions
larsoner Jun 29, 2024
1a790db
FIX: Reqs
larsoner Jun 29, 2024
49ffe96
FIX: Another
larsoner Jun 29, 2024
d216d79
FIX: Refactor
larsoner Jun 29, 2024
be7aaaf
FIX: Generic
larsoner Jun 29, 2024
17c8bef
FIX: Simplify
larsoner Jun 29, 2024
c04ac56
FIX: Name
larsoner Jun 29, 2024
161ac9e
WIP: Still need to get rid of PyQt5
larsoner Jun 29, 2024
7a9edad
WIP
larsoner Jul 6, 2024
a187742
Merge remote-tracking branch 'upstream/main' into bump
larsoner Jul 6, 2024
1152191
FIX: Try
larsoner Jul 6, 2024
015732a
FIX: Ver
larsoner Jul 6, 2024
39df5ad
FIX: Mpl
larsoner Jul 6, 2024
33a0bbf
FIX: More
larsoner Jul 6, 2024
48253f4
FIX: Ubuntu
larsoner Jul 6, 2024
a6a720d
FIX: Test
larsoner Jul 6, 2024
d197a91
FIX: Ver
larsoner Jul 6, 2024
a0a7823
ENH: mnelab
larsoner Jul 6, 2024
97b0f24
FIX: Another
larsoner Jul 6, 2024
e540ed9
FIX: State
larsoner Jul 6, 2024
3f57e72
FIX: Todo
larsoner Jul 6, 2024
aaaa8fe
FIX: Comment
larsoner Jul 6, 2024
f3a5fac
FIX: Try no spyder
larsoner Jul 6, 2024
ed5ac82
FIX: Missing
larsoner Jul 6, 2024
f384936
FIX: Try another
larsoner Jul 9, 2024
8ba7f6d
FIX: Try again
larsoner Jul 9, 2024
9271123
FIX: RC and not migrated
larsoner Jul 9, 2024
baf9bde
FIX: Good enough
larsoner Jul 9, 2024
3a2994e
FIX: Not RC
larsoner Jul 9, 2024
c33ff99
FIX: Maybe?
larsoner Jul 9, 2024
15fcc47
FIX: Fixes
larsoner Jul 9, 2024
f675e5b
TST: Ping
larsoner Jul 9, 2024
9f6e1d1
FIX: sip is from pyqt
larsoner Jul 9, 2024
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
13 changes: 1 addition & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
condarc: |
channels:
- conda-forge
channel_priority: strict
larsoner marked this conversation as resolved.
Show resolved Hide resolved
environment-file: environment.yml
- run: ./tools/extract_version.sh
- run: ./tools/macos_install_certificates.sh
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -232,6 +220,7 @@ jobs:
qt: true
pyvista: false
- run: ./tools/check_installation.sh
timeout-minutes: 5 # < 2 min even on Windows

# Release
release:
Expand Down
74 changes: 43 additions & 31 deletions recipes/mne-python/construct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/test_dev_installed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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()
6 changes: 6 additions & 0 deletions tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
40 changes: 18 additions & 22 deletions tests/test_json_versions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Read the JSON and YAML and make sure the version + build match

import fnmatch
import json
import os
import pathlib
Expand Down Expand Up @@ -34,40 +35,35 @@
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"
assert fname.is_file(), (fname, os.listdir(os.getcwd()))
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
9 changes: 2 additions & 7 deletions tests/test_outdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = []

Expand Down