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

MAINT: bump versions #1200

Merged
merged 3 commits into from
Nov 23, 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
45 changes: 28 additions & 17 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.11"] # Oldest and newest supported versions
python-version: ["3.9", "3.12"] # Oldest and newest supported versions
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down Expand Up @@ -107,15 +107,26 @@ jobs:
python -c 'import matplotlib; print(matplotlib.__version__)'
python -c 'import pandas; print(pandas.__version__)'
python -c 'import EDFlib; print("EDFlib has no .__version__")'
python -c 'import edfio; print(edfio.__version__)'

test:
# For GitHub "required" CI checks, add in branch protection:
# 6 checks:
# for each OS (ubuntu, macos, windows):
# 3.9 -> stable / full / stable
# 3.12 -> stable / full / stable
#
# 3 additional checks:
# ubuntu / 3.12 / main / full / main
# ubuntu / 3.9 / prev / full / stable
# ubuntu / 3.12 / stable / minimal / stable
timeout-minutes: 60
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.11"] # Oldest and newest supported versions
python-version: ["3.9", "3.12"] # Oldest and newest supported versions
mne-version: [mne-stable]
mne-bids-install: [full]
bids-validator-version: [validator-stable]
Expand All @@ -124,19 +135,19 @@ jobs:
# special test runs running only on single CI systems to save resources
# Test development versions
- os: ubuntu-latest
python-version: "3.11"
python-version: "3.12"
mne-version: mne-main
mne-bids-install: full
bids-validator-version: validator-main
# Test previous MNE stable version
- os: ubuntu-latest
python-version: "3.8"
python-version: "3.9"
mne-version: mne-prev-stable
mne-bids-install: full
bids-validator-version: validator-stable
# Test minimal mne-bids install
- os: ubuntu-latest
python-version: "3.11"
python-version: "3.12"
mne-version: mne-stable
mne-bids-install: minimal
bids-validator-version: validator-stable
Expand Down Expand Up @@ -170,39 +181,39 @@ jobs:
python -m pip install --upgrade -r test_requirements.txt

- name: Install MNE (stable)
if: "matrix.mne-version == 'mne-stable'"
if: matrix.mne-version == 'mne-stable'
run: |
git clone --single-branch --branch maint/1.5 https://github.com/mne-tools/mne-python.git
git clone --single-branch --branch maint/1.6 https://github.com/mne-tools/mne-python.git
python -m pip install -e ./mne-python

- name: Install MNE (previous stable)
if: "matrix.mne-version == 'mne-prev-stable'"
if: matrix.mne-version == 'mne-prev-stable'
run: |
git clone --single-branch --branch maint/1.4 https://github.com/mne-tools/mne-python.git
git clone --single-branch --branch maint/1.5 https://github.com/mne-tools/mne-python.git
python -m pip install -e ./mne-python

- name: Install MNE (main)
if: "matrix.mne-version == 'mne-main'"
if: matrix.mne-version == 'mne-main'
run: |
git clone --single-branch --branch main https://github.com/mne-tools/mne-python.git
python -m pip install -e ./mne-python

- name: Install BIDS validator (stable)
if: "matrix.bids-validator-version == 'validator-stable'"
if: matrix.bids-validator-version == 'validator-stable'
run: |
npm install -g bids-validator
echo "BIDS_VALIDATOR_BRANCH=stable" >> $GITHUB_ENV

- name: Download BIDS validator (main)
if: "matrix.bids-validator-version == 'validator-main'"
if: matrix.bids-validator-version == 'validator-main'
run: |
pushd ..
git clone --depth 1 https://github.com/bids-standard/bids-validator
popd
echo "BIDS_VALIDATOR_BRANCH=main" >> $GITHUB_ENV

- name: Install BIDS validator (main)
if: "matrix.bids-validator-version == 'validator-main'"
if: matrix.bids-validator-version == 'validator-main'
run: |
pushd ..
cd bids-validator
Expand All @@ -228,17 +239,17 @@ jobs:
mne sys_info

- name: Install MNE-BIDS (minimal)
if: "matrix.mne-bids-install == 'minimal'"
if: matrix.mne-bids-install == 'minimal'
run: python -m pip install -e .

- name: Install MNE-BIDS (full)
if: "matrix.mne-bids-install == 'full'"
if: matrix.mne-bids-install == 'full'
run: python -m pip install -e .[full]

# Only run on a limited set of jobs
- name: Run pytest without testing data
run: make test
if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' && matrix.mne-version == 'mne-main' }}
if: ${{ matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.mne-version == 'mne-main' }}

# Get testing data
- run: ./tools/get_testing_version.sh
Expand Down
16 changes: 9 additions & 7 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@ Dependencies

Required:

* ``mne`` (>=1.4)
* ``numpy`` (>=1.20.2)
* ``scipy`` (>=1.6.3)
* ``mne`` (>=1.5)
* ``numpy`` (>=1.21.2)
* ``scipy`` (>=1.7.0)

Optional:

* ``nibabel`` (>=3.2.1, for processing MRI data)
* ``pybv`` (>=0.7.5, for writing BrainVision data)
* ``eeglabio`` (>=0.0.2, for writing EEGLAB data)
* ``pymatreader`` (>=0.0.30, for other operations with EEGLAB data)
* ``matplotlib`` (>=3.4.0, for using the interactive data inspector)
* ``pandas`` (>=1.2.4, for generating event statistics)
* ``EDFlib-Python`` (>=1.0.6, for writing EDF data)
* ``matplotlib`` (>=3.5.0, for using the interactive data inspector)
* ``pandas`` (>=1.3.2, for generating event statistics)
* ``EDFlib-Python`` (>=1.0.6, for writing EDF data with ``mne`` versions <1.7)
* ``edfio`` (>=0.2.1, for writing EDF data)


We recommend installing ``mne-bids`` into an isolated Python environment,
for example created via ``conda``
(may be obtained through `miniconda <https://docs.conda.io/en/latest/miniconda.html>`_).
We require that you **use Python 3.8 or higher**.
We require that you **use Python 3.9 or higher**.
You may choose to install ``mne-bids`` into your isolated Python environment
`via pip <#installation-via-pip>`_ or
`via conda <#installation-via-conda>`_.
Expand Down
7 changes: 6 additions & 1 deletion doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ The following authors contributed for the first time. Thank you so much! 🤩

The following authors had contributed before. Thank you for sticking around! 🤘

* `Laetitia Fesselier`_
* `Richard Höchenberger`_
* `Stefan Appelhoff`_

Detailed list of changes
Expand All @@ -39,7 +41,10 @@ Detailed list of changes
🛠 Requirements
^^^^^^^^^^^^^^^

- nothing yet
- MNE-BIDS now requires Python 3.9 or higher.
- MNE-BIDS now requires MNE-Python 1.5.0 or higher.
- ``edfio`` replaces ``EDFlib-Python`` for export to EDF with MNE-Python >= 1.7.0.
- Version requirements for optional dependency packages have been bumped up, see installation instructions.

🪲 Bug fixes
^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion examples/anonymize_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
# anonymize the entire dataset again.

for i in range(2):
print(f"\n\nRun {i+1}\n")
print(f"\n\nRun {i + 1}\n")
shutil.rmtree(bids_root_anon)
anonymize_dataset(
bids_root_in=bids_root,
Expand Down
10 changes: 0 additions & 10 deletions mne_bids/copyfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@
import re
import shutil as sh

import mne
from mne.io import read_raw_brainvision, read_raw_edf, read_raw_bdf, anonymize_info
from mne.utils import logger, verbose
from mne.fixes import _compare_version
import numpy as np
from scipy.io import loadmat, savemat

Expand Down Expand Up @@ -617,14 +615,6 @@ def copyfile_bti(raw, dest):
copyfile_kit

"""
# XXX: remove after support for mne<1.5 is dropped
# BTi operations were unreliable in mne-bids prior to mne 1.5 / mne-bids 0.13
need_mne = "1.4.2"
if not _compare_version(mne.__version__, ">", need_mne): # pragma: no cover
raise ImportError(
f"mne > {need_mne} is required for BTi operations, got {mne.__version__}"
)

os.makedirs(dest, exist_ok=True)
for key, val in (
("pdf_fname", None),
Expand Down
1 change: 0 additions & 1 deletion mne_bids/tests/test_copyfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ def test_copyfile_kit(tmp_path):
@testing.requires_testing_data
def test_copyfile_bti(tmp_path, dataset):
"""Test copying and renaming BTi files to a new location."""
pytest.importorskip("mne", "1.5.0.dev") # XXX: remove when mne<1.5 is dropped
pdf_fname = testing_path / "BTi" / dataset / "c,rfDC"
kwargs = dict(head_shape_fname=None) if dataset == "erm_HFH" else dict()
raw = mne.io.read_raw_bti(pdf_fname, **kwargs, verbose=False)
Expand Down
1 change: 0 additions & 1 deletion mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,6 @@ def test_ctf(_bids_validate, tmp_path):
@pytest.mark.filterwarnings(warning_str["channel_unit_changed"])
def test_bti(_bids_validate, tmp_path, dataset):
"""Test functionality of the write_raw_bids conversion for BTi data."""
pytest.importorskip("mne", "1.5.0.dev") # XXX: remove when mne<1.5 is dropped
if dataset == "inbuilt_linux":
bti_path = op.join(base_path, "bti", "tests", "data")
pdf_fname = op.join(bti_path, "test_pdf_linux")
Expand Down
18 changes: 10 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ classifiers =
Operating System :: POSIX :: Linux
Operating System :: MacOS
Programming Language :: Python
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
project_urls =
Documentation = https://mne.tools/mne-bids
Bug Reports = https://github.com/mne-tools/mne-bids/issues
Source = https://github.com/mne-tools/mne-bids

[options]
python_requires = ~= 3.8
python_requires = ~= 3.9
install_requires =
mne >= 1.4
numpy >= 1.20.2
scipy >= 1.6.3
mne >= 1.5
numpy >= 1.21.2
scipy >= 1.7.1
packages = find:
include_package_data = True

Expand All @@ -46,9 +46,10 @@ full =
pybv >= 0.7.5
eeglabio >= 0.0.2
pymatreader >= 0.0.30
matplotlib >= 3.4.0
pandas >= 1.2.4
EDFlib-Python >= 1.0.6
matplotlib >= 3.5.0
pandas >= 1.3.2
EDFlib-Python >= 1.0.6 # drop once mne <1.7 is no longer supported
edfio >= 0.2.1

[options.entry_points]
console_scripts =
Expand Down Expand Up @@ -93,6 +94,7 @@ filterwarnings =
ignore:`np.MachAr` is deprecated.*:DeprecationWarning
# old MNE _fake_click
ignore:The .*_event function was deprecated in Matplotlib.*:
ignore:datetime\.datetime\.utcfromtimestamp.* is deprecated and scheduled for removal in a future version.*:DeprecationWarning

[pydocstyle]
convention = pep257
Expand Down
13 changes: 7 additions & 6 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
mne>=1.4
numpy>=1.20.2
scipy>=1.6.3
mne>=1.5
numpy>=1.21.2
scipy>=1.7.1
nibabel>=3.2.1
pybv>=0.7.5
eeglabio>=0.0.2
pymatreader>=0.0.30
matplotlib>=3.4.0
pandas>=1.2.4
EDFlib-Python>=1.0.6
matplotlib>=3.5.0
pandas>=1.3.2
EDFlib-Python>=1.0.6 # drop once mne <1.7 is no longer supported
edfio >= 0.2.1
pytest
pytest-cov
pytest-sugar
Expand Down