From 148cc76ca3ff1c2f1ceb0c32203247bc44e76be6 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 17 May 2023 15:13:38 -0400 Subject: [PATCH] TST: Add tests for setuptools_scm versions (#188) --- recipes/mne-python_1.4/construct.yaml | 24 ++++++++++++------------ tests/test_imports.py | 10 ++++++++++ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/recipes/mne-python_1.4/construct.yaml b/recipes/mne-python_1.4/construct.yaml index 966cf085..0b3c31fb 100644 --- a/recipes/mne-python_1.4/construct.yaml +++ b/recipes/mne-python_1.4/construct.yaml @@ -1,4 +1,4 @@ -version: 1.4.0_0 +version: 1.4.0_1 name: MNE-Python company: MNE-Python Developers # When the version above changes to a new major/minor, it needs to be updated @@ -18,17 +18,17 @@ initialize_by_default: False register_python_default: False # default_prefix will be ignored by macOS .pkg installer! -default_prefix: ${HOME}/mne-python/1.4.0_0 # [linux] -default_prefix: "%USERPROFILE%\\mne-python\\1.4.0_0" # [win] -default_prefix_domain_user: "%LOCALAPPDATA%\\mne-python\\1.4.0_0" # [win] -default_prefix_all_users: "%ALLUSERSPROFILE%\\mne-python\\1.4.0_0" # [win] +default_prefix: ${HOME}/mne-python/1.4.0_1 # [linux] +default_prefix: "%USERPROFILE%\\mne-python\\1.4.0_1" # [win] +default_prefix_domain_user: "%LOCALAPPDATA%\\mne-python\\1.4.0_1" # [win] +default_prefix_all_users: "%ALLUSERSPROFILE%\\mne-python\\1.4.0_1" # [win] uninstall_name: MNE-Python ${VERSION} (Python ${PYVERSION}) -installer_filename: MNE-Python-1.4.0_0-macOS_Intel.pkg # [osx and not arm64] -installer_filename: MNE-Python-1.4.0_0-macOS_M1.pkg # [osx and arm64] -installer_filename: MNE-Python-1.4.0_0-Windows.exe # [win] -installer_filename: MNE-Python-1.4.0_0-Linux.sh # [linux] +installer_filename: MNE-Python-1.4.0_1-macOS_Intel.pkg # [osx and not arm64] +installer_filename: MNE-Python-1.4.0_1-macOS_M1.pkg # [osx and arm64] +installer_filename: MNE-Python-1.4.0_1-Windows.exe # [win] +installer_filename: MNE-Python-1.4.0_1-Linux.sh # [linux] post_install: ../../assets/post_install_macOS.sh # [osx] post_install: ../../assets/post_install_linux.sh # [linux] @@ -88,8 +88,8 @@ specs: - mamba =1.4.2 - openblas =0.3.23 - jupyter =1.0.0 - - jupyterlab =3.6.3 - - ipykernel =6.23.0 + - jupyterlab =4.0.0 + - ipykernel =6.23.1 - nb_conda_kernels =2.3.1 - spyder-kernels =2.4.3 - spyder =5.4.3 @@ -145,4 +145,4 @@ condarc: - conda-forge channel_priority: strict allow_other_channels: False - env_prompt: "(mne-1.4.0_0) " + env_prompt: "(mne-1.4.0_1) " diff --git a/tests/test_imports.py b/tests/test_imports.py index dd75d3c2..7df766b1 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -1,11 +1,21 @@ import platform + +def check_min_version(package, min_version): + from packaging.version import parse + assert parse(package.__version__) >= parse(min_version), f'{package}: got {package.__version__} wanted {min_version}' + + import mne +check_min_version(mne, '1.4') import mne_bids import mne_bids_pipeline +check_min_version(mne_bids_pipeline, '1.2') import mne_connectivity import mne_faster import mne_nirs +import mne_qt_browser +check_min_version(mne_qt_browser, '0.5.0') import mne_realtime import mne_features import mne_rsa