Skip to content

Commit

Permalink
MAINT: Bump to 1.0.2 (#118)
Browse files Browse the repository at this point in the history
* MAINT: Bump to 1.0.2

* FIX: Bump

* TST: Revert to 1.0.1_1, should fail

* FIX: Better failure

* FIX: Move export

* FIX: Proper bump

* FIX: Name

* FIX: Windows encoding
  • Loading branch information
larsoner authored Apr 15, 2022
1 parent e8da773 commit c073828
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 34 deletions.
49 changes: 26 additions & 23 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,29 @@ jobs:
run: |
.\MNE-Python-%MNE_INSTALLER_VERSION%-Windows.exe /S /InstallationType=JustMe /AddToPath=1
- name: Export frozen environment definition (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
source /Applications/MNE-Python/.mne-python/bin/activate
mamba list --json > MNE-Python-${MNE_INSTALLER_VERSION}-macOS_Intel.env.json
cat MNE-Python-${MNE_INSTALLER_VERSION}-macOS_Intel.env.json
- name: Export frozen environment definition (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
source ~/mne-python/${MNE_INSTALLER_VERSION}/bin/activate
mamba list --json > MNE-Python-${MNE_INSTALLER_VERSION}-Linux.env.json
cat MNE-Python-${MNE_INSTALLER_VERSION}-Linux.env.json
- name: Export frozen environment definition (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
$MneRoot = "$env:UserProfile\mne-python\$env:MNE_INSTALLER_VERSION"
. "$MneRoot\shell\condabin\conda-hook.ps1"
conda activate $MneRoot
mamba list --json > MNE-Python-$env:MNE_INSTALLER_VERSION-Windows.env.json
Get-Content MNE-Python-$env:MNE_INSTALLER_VERSION-Windows.env.json
- name: Check installation (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
Expand Down Expand Up @@ -230,6 +253,7 @@ jobs:
python tests/test_gui.py
python tests/test_gui_macosx.py
python tests/test_notebook.py
python tests/test_json_versions.py
- name: Check installation (Linux)
if: ${{ runner.os == 'Linux' }}
Expand Down Expand Up @@ -274,6 +298,7 @@ jobs:
python tests/test_imports.py
python tests/test_gui.py
python tests/test_notebook.py
python tests/test_json_versions.py
- name: Check installation (Windows)
if: ${{ runner.os == 'Windows' }}
Expand All @@ -292,6 +317,7 @@ jobs:
python tests\test_imports.py
python tests\test_gui.py
python tests\test_notebook.py
python tests/test_json_versions.py
# - name: Archive artifacts
# if: ${{ matrix.os == 'ubuntu-18.04' || matrix.os == 'macOS-10.15' || matrix.os == 'windows-2016' }}
Expand All @@ -301,29 +327,6 @@ jobs:
# path: |
# MNE-Python-*.*

- name: Export frozen environment definition (macOS)
if: ${{ runner.os == 'macOS' }}
run: |
source /Applications/MNE-Python/.mne-python/bin/activate
mamba list --json > MNE-Python-${MNE_INSTALLER_VERSION}-macOS_Intel.env.json
cat MNE-Python-${MNE_INSTALLER_VERSION}-macOS_Intel.env.json
- name: Export frozen environment definition (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
source ~/mne-python/${MNE_INSTALLER_VERSION}/bin/activate
mamba list --json > MNE-Python-${MNE_INSTALLER_VERSION}-Linux.env.json
cat MNE-Python-${MNE_INSTALLER_VERSION}-Linux.env.json
- name: Export frozen environment definition (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
$MneRoot = "$env:UserProfile\mne-python\$env:MNE_INSTALLER_VERSION"
. "$MneRoot\shell\condabin\conda-hook.ps1"
conda activate $MneRoot
mamba list --json > MNE-Python-$env:MNE_INSTALLER_VERSION-Windows.env.json
Get-Content MNE-Python-$env:MNE_INSTALLER_VERSION-Windows.env.json
- name: Release
if: |
github.ref_type == 'tag' &&
Expand Down
22 changes: 11 additions & 11 deletions recipes/mne-python_1.0/construct.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.0.1_1
version: 1.0.2_0
name: MNE-Python
company: MNE-Python Developers

Expand All @@ -16,16 +16,16 @@ initialize_by_default: False
register_python_default: False

# default_prefix will be ignored by macOS .pkg installer!
default_prefix: ${HOME}/mne-python/1.0.1_1 # [linux]
default_prefix: "%USERPROFILE%\\mne-python\\1.0.1_1" # [win]
default_prefix_domain_user: "%LOCALAPPDATA%\\mne-python\\1.0.1_1" # [win]
default_prefix_all_users: "%ALLUSERSPROFILE%\\mne-python\\1.0.1_1" # [win]
default_prefix: ${HOME}/mne-python/1.0.2_0 # [linux]
default_prefix: "%USERPROFILE%\\mne-python\\1.0.2_0" # [win]
default_prefix_domain_user: "%LOCALAPPDATA%\\mne-python\\1.0.2_0" # [win]
default_prefix_all_users: "%ALLUSERSPROFILE%\\mne-python\\1.0.2_0" # [win]

uninstall_name: MNE-Python ${VERSION} (Python ${PYVERSION})

installer_filename: MNE-Python-1.0.1_1-macOS_Intel.pkg # [osx]
installer_filename: MNE-Python-1.0.1_1-Windows.exe # [win]
installer_filename: MNE-Python-1.0.1_1-Linux.sh # [linux]
installer_filename: MNE-Python-1.0.2_0-macOS_Intel.pkg # [osx]
installer_filename: MNE-Python-1.0.2_0-Windows.exe # [win]
installer_filename: MNE-Python-1.0.2_0-Linux.sh # [linux]

post_install: ../../assets/post_install_macOS.sh # [osx]
post_install: ../../assets/post_install_linux.sh # [linux]
Expand Down Expand Up @@ -56,8 +56,8 @@ specs:
- jinja2 <3.1,>=2.10 # Remove once https://github.com/conda-forge/numpydoc-feedstock/pull/17 has been merged
# TODO: ⛔️ ⛔️ ⛔️ REMOVE ASAP STOP ⛔️ ⛔️ ⛔️

- mne =1.0.1=*_0
- mne-installer-menus =1.0.1=*_0
- mne =1.0.2=*_0
- mne-installer-menus =1.0.2=*_0
- mne-qt-browser ~=0.3.0
- mne-bids ~=0.10.0
- mne-connectivity ~=0.3.0
Expand Down Expand Up @@ -125,4 +125,4 @@ condarc:
- conda-forge
channel_priority: strict
allow_other_channels: False
env_prompt: "(mne-1.0.1_1) "
env_prompt: "(mne-1.0.2_0) "
36 changes: 36 additions & 0 deletions tests/test_json_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Read the JSON and YAML and make sure the version + build match

import json
import os
import pathlib
import sys
import yaml

dir_ = pathlib.Path(__file__).parent.parent

sys_name = dict(
linux='Linux',
darwin='macOS_Intel',
win32='Windows',
)[sys.platform]

with open(dir_ / 'recipes' / 'mne-python_1.0' / 'construct.yaml',
encoding='utf-8') as fid:
params = yaml.safe_load(fid)
want_version = params['version']

fname = dir_ / f'MNE-Python-{want_version}-{sys_name}.env.json'
assert fname.is_file(), (fname, os.listdir(os.getcwd()))
with open(fname, encoding='utf-8') as fid:
env_json = json.load(fid)
got_versions = dict()
for package in env_json:
if package['name'] in ('mne', 'mne-installer-menus'):
v, b = package['version'], package['build_number']
got_versions[package['name']] = f'{v}_{b}'
assert len(got_versions) == 2, got_versions

# check versions
for name, version in got_versions.items():
msg = f'{name}: got {repr(version)} != want {repr(want_version)}'
assert version == want_version, msg

0 comments on commit c073828

Please sign in to comment.