Skip to content

Commit

Permalink
MAINT: Update installers (mne-tools#12798)
Browse files Browse the repository at this point in the history
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
larsoner and autofix-ci[bot] authored Aug 19, 2024
1 parent bf5173b commit a82528d
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 241 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ jobs:
python: '3.10'
kind: mamba
- os: ubuntu-latest
python: '3.9'
python: '3.10'
kind: minimal
- os: ubuntu-20.04
python: '3.9'
python: '3.10'
kind: old
steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ Dependencies
The minimum required dependencies to run MNE-Python are:

- `Python <https://www.python.org>`__ ≥ 3.9
- `NumPy <https://numpy.org>`__ ≥ 1.23
- `SciPy <https://scipy.org>`__ ≥ 1.9
- `NumPy <https://numpy.org>`__ ≥ 1.24
- `SciPy <https://scipy.org>`__ ≥ 1.10
- `Matplotlib <https://matplotlib.org>`__ ≥ 3.6
- `Pooch <https://www.fatiando.org/pooch/latest/>`__ ≥ 1.5
- `tqdm <https://tqdm.github.io>`__
Expand All @@ -85,25 +85,25 @@ The minimum required dependencies to run MNE-Python are:

For full functionality, some functions require:

- `scikit-learn <https://scikit-learn.org/stable/>`__ ≥ 1.1
- `Joblib <https://joblib.readthedocs.io/en/latest/index.html>`__ ≥ 0.15 (for parallelization)
- `scikit-learn <https://scikit-learn.org/stable/>`__ ≥ 1.2
- `Joblib <https://joblib.readthedocs.io/en/latest/index.html>`__ ≥ 1.2 (for parallelization)
- `mne-qt-browser <https://github.com/mne-tools/mne-qt-browser>`__ ≥ 0.5 (for fast raw data visualization)
- `Qt <https://www.qt.io>`__ ≥ 5.15 via one of the following bindings (for fast raw data visualization and interactive 3D visualization):

- `PySide6 <https://doc.qt.io/qtforpython-6/>`__ ≥ 6.0
- `PyQt6 <https://www.riverbankcomputing.com/software/pyqt/>`__ ≥ 6.0
- `PyQt5 <https://www.riverbankcomputing.com/software/pyqt/>`__ ≥ 5.15

- `Numba <https://numba.pydata.org>`__ ≥ 0.54.0
- `Numba <https://numba.pydata.org>`__ ≥ 0.56.4
- `NiBabel <https://nipy.org/nibabel/>`__ ≥ 3.2.1
- `OpenMEEG <https://openmeeg.github.io>`__ ≥ 2.5.6
- `pandas <https://pandas.pydata.org>`__ ≥ 1.3.2
- `pandas <https://pandas.pydata.org>`__ ≥ 1.5.2
- `Picard <https://pierreablin.github.io/picard/>`__ ≥ 0.3
- `CuPy <https://cupy.dev>`__ ≥ 9.0.0 (for NVIDIA CUDA acceleration)
- `DIPY <https://dipy.org>`__ ≥ 1.4.0
- `imageio <https://imageio.readthedocs.io/en/stable/>`__ ≥ 2.8.0
- `PyVista <https://pyvista.org>`__ ≥ 0.32 (for 3D visualization)
- `PyVistaQt <https://qtdocs.pyvista.org>`__ ≥ 0.4 (for 3D visualization)
- `PyVista <https://pyvista.org>`__ ≥ 0.37 (for 3D visualization)
- `PyVistaQt <https://qtdocs.pyvista.org>`__ ≥ 0.9 (for 3D visualization)
- `mffpy <https://github.com/BEL-Public/mffpy>`__ ≥ 0.5.7
- `h5py <https://www.h5py.org>`__
- `h5io <https://github.com/h5io/h5io>`__
Expand Down
5 changes: 5 additions & 0 deletions doc/changes/devel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. See doc/development/contributing.rst for description of how to add entries.
.. _current:

.. towncrier-draft-entries:: Version |release| (development)
1 change: 1 addition & 0 deletions doc/changes/devel/12798.dependency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Minimum supported dependencies were updated in accordance with SPEC0_, most notably Python 3.10+ is now required.
4 changes: 2 additions & 2 deletions doc/development/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ Creating the virtual environment

These instructions will set up a Python environment that is separated from your
system-level Python and any other managed Python environments on your computer.
This lets you switch between different versions of Python (MNE-Python requires
version 3.9 or higher) and also switch between the stable and development
This lets you switch between different versions of Python and also switch between
the stable and development
versions of MNE-Python (so you can, for example, use the same computer to
analyze your data with the stable release, and also work with the latest
development version to fix bugs or add new features). Even if you've already
Expand Down
1 change: 1 addition & 0 deletions doc/development/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Changes for each version of MNE-Python are listed below.
.. toctree::
:maxdepth: 1

../changes/devel.rst
../changes/v1.8.rst
../changes/v1.7.rst
../changes/v1.6.rst
Expand Down
10 changes: 5 additions & 5 deletions doc/install/installers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Python packages and tools. Got any questions? Let us know on the `MNE Forum`_!
:class-content: text-center
:name: linux-installers

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.1/MNE-Python-1.7.1_0-Linux.sh
.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.8.0/MNE-Python-1.8.0_0-Linux.sh
:ref-type: ref
:color: primary
:shadow:
Expand All @@ -28,14 +28,14 @@ Python packages and tools. Got any questions? Let us know on the `MNE Forum`_!

.. code-block:: console
$ sh ./MNE-Python-1.7.1_0-Linux.sh
$ sh ./MNE-Python-1.8.0_0-Linux.sh
.. tab-item:: macOS (Intel)
:class-content: text-center
:name: macos-intel-installers

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.1/MNE-Python-1.7.1_0-macOS_Intel.pkg
.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.8.0/MNE-Python-1.8.0_0-macOS_Intel.pkg
:ref-type: ref
:color: primary
:shadow:
Expand All @@ -51,7 +51,7 @@ Python packages and tools. Got any questions? Let us know on the `MNE Forum`_!
:class-content: text-center
:name: macos-apple-installers

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.1/MNE-Python-1.7.1_0-macOS_M1.pkg
.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.8.0/MNE-Python-1.8.0_0-macOS_M1.pkg
:ref-type: ref
:color: primary
:shadow:
Expand All @@ -67,7 +67,7 @@ Python packages and tools. Got any questions? Let us know on the `MNE Forum`_!
:class-content: text-center
:name: windows-installers

.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.7.1/MNE-Python-1.7.1_0-Windows.exe
.. button-link:: https://github.com/mne-tools/mne-installers/releases/download/v1.8.0/MNE-Python-1.8.0_0-Windows.exe
:ref-type: ref
:color: primary
:shadow:
Expand Down
1 change: 1 addition & 0 deletions doc/links.inc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
.. _python: http://www.python.org
.. _Brain Imaging Data Structure: https://bids.neuroimaging.io/
.. _SPEC0: https://scientific-python.org/specs/spec-0000

.. python packages
Expand Down
37 changes: 3 additions & 34 deletions mne/datasets/_fsaverage/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

import os
from pathlib import Path, PosixPath, WindowsPath
from pathlib import Path

from ...utils import get_subjects_dir, set_config, verbose, warn
from ...utils import get_subjects_dir, set_config, verbose
from ..utils import _get_path, _manifest_check_download

FSAVERAGE_MANIFEST_PATH = Path(__file__).parent
Expand Down Expand Up @@ -83,7 +82,7 @@ def fetch_fsaverage(subjects_dir=None, *, verbose=None):
url="https://osf.io/7ve8g/download?version=4",
hash_="b31509cdcf7908af6a83dc5ee8f49fb1",
)
return _mne_path(fs_dir)
return fs_dir


def _get_create_subjects_dir(subjects_dir):
Expand All @@ -102,33 +101,3 @@ def _set_montage_coreg_path(subjects_dir=None):
if old_subjects_dir is None:
set_config("SUBJECTS_DIR", subjects_dir)
return subjects_dir


# Adapted from pathlib.Path.__new__
def _mne_path(path):
klass = MNEWindowsPath if os.name == "nt" else MNEPosixPath
out = klass(path)
assert isinstance(out, klass)
return out


class _PathAdd:
def __add__(self, other):
if isinstance(other, str):
warn(
"data_path functions now return pathlib.Path objects which "
"do not natively support the plus (+) operator, switch to "
"using forward slash (/) instead. Support for plus will be "
"removed in 1.2.",
FutureWarning,
)
return f"{str(self)}{other}"
raise NotImplementedError


class MNEWindowsPath(_PathAdd, WindowsPath): # noqa: D101
pass


class MNEPosixPath(_PathAdd, PosixPath): # noqa: D101
pass
4 changes: 0 additions & 4 deletions mne/datasets/tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

import os
import re
import shutil
import zipfile
Expand Down Expand Up @@ -89,9 +88,6 @@ def noop(*args, **kwargs):
monkeypatch.setattr(mne.datasets._fsaverage.base, "_manifest_check_download", noop)
sd_2 = datasets.fetch_fsaverage()
assert sd / "fsaverage" == sd_2
with pytest.warns(FutureWarning, match="switch to using forward slash"):
sd_label_str = sd_2 + f"{os.sep}label"
assert sd_label_str == str(sd_2 / "label")


@requires_good_network
Expand Down
2 changes: 1 addition & 1 deletion mne/export/_edf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright the MNE-Python contributors.

import datetime as dt
from typing import Callable
from collections.abc import Callable

import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion mne/fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def _crop_colorbar(cbar, cbar_vmin, cbar_vmax):
try:
import numba

if _compare_version(numba.__version__, "<", "0.53.1"):
if _compare_version(numba.__version__, "<", "0.56.4"):
raise ImportError
prange = numba.prange

Expand Down
12 changes: 3 additions & 9 deletions mne/io/egi/egi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..._fiff.meas_info import _empty_info
from ..._fiff.utils import _create_chs, _read_segments_file
from ...annotations import Annotations
from ...utils import _check_fname, _validate_type, logger, verbose, warn
from ...utils import _check_fname, _validate_type, logger, verbose
from ..base import BaseRaw
from .egimff import _read_raw_egi_mff
from .events import _combine_triggers, _triage_include_exclude
Expand Down Expand Up @@ -100,7 +100,7 @@ def read_raw_egi(
preload=False,
channel_naming="E%d",
*,
events_as_annotations=None,
events_as_annotations=True,
verbose=None,
) -> "RawEGI":
"""Read EGI simple binary as raw object.
Expand Down Expand Up @@ -169,13 +169,7 @@ def read_raw_egi(
"""
_validate_type(input_fname, "path-like", "input_fname")
input_fname = str(input_fname)
if events_as_annotations is None:
warn(
"events_as_annotations defaults to False in 1.8 but will change to "
"True in 1.9, set it explicitly to avoid this warning",
FutureWarning,
)
events_as_annotations = False
_validate_type(events_as_annotations, bool, "events_as_annotations")

if input_fname.rstrip("/\\").endswith(".mff"): # allows .mff or .mff/
return _read_raw_egi_mff(
Expand Down
2 changes: 1 addition & 1 deletion mne/io/egi/egimff.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def _read_raw_egi_mff(
preload=False,
channel_naming="E%d",
*,
events_as_annotations=False,
events_as_annotations=True,
verbose=None,
):
"""Read EGI mff binary as raw object."""
Expand Down
4 changes: 3 additions & 1 deletion mne/io/egi/tests/test_egi.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,15 @@ def test_egi_mff_pause(fname, skip_times, event_times):
pytest.importorskip("defusedxml")
if fname == egi_pause_w1337_fname:
# too slow to _test_raw_reader
raw = read_raw_egi(fname).load_data()
raw = read_raw_egi(fname, events_as_annotations=False).load_data()
else:
with pytest.warns(RuntimeWarning, match="Acquisition skips detected"):
raw = _test_raw_reader(
read_raw_egi,
input_fname=fname,
test_scaling=False, # XXX probably some bug
test_rank="less",
events_as_annotations=False,
)
assert raw.info["sfreq"] == 250.0 # true for all of these files
assert len(raw.annotations) == len(skip_times)
Expand Down Expand Up @@ -252,6 +253,7 @@ def test_io_egi():
include=include,
test_rank="less",
test_scaling=False, # XXX probably some bug
events_as_annotations=False,
)

assert "eeg" in raw
Expand Down
Loading

0 comments on commit a82528d

Please sign in to comment.