Skip to content
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
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ stages:
- bash: |
set -eo pipefail
python -m pip install --progress-bar off --upgrade pip
python -m pip install --progress-bar off "mne-qt-browser[opengl] @ git+https://github.com/mne-tools/mne-qt-browser.git" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1,!=6.8.1.1,!=6.9.1" pandas neo pymatreader antio defusedxml curryreader pymef
python -m pip install --progress-bar off "mne-qt-browser @ https://github.com/mne-tools/mne-qt-browser/archive/refs/heads/main.zip" pyvista scikit-learn python-picard qtpy nibabel sphinx-gallery "PySide6!=6.8.0,!=6.8.0.1,!=6.8.1.1,!=6.9.1" pandas neo pymatreader antio defusedxml curryreader pymef
python -m pip uninstall -yq mne
python -m pip install --progress-bar off --upgrade -e . --group=test
displayName: 'Install dependencies with pip'
Expand Down Expand Up @@ -164,7 +164,7 @@ stages:
python -m pip install --progress-bar off --upgrade pip
python -m pip install --progress-bar off --upgrade --pre --only-binary=\"numpy,scipy,matplotlib,vtk\" numpy scipy matplotlib vtk
python -c "import vtk"
python -m pip install --progress-bar off --upgrade -ve .[full] --group=test_extra
python -m pip install --progress-bar off --upgrade -ve .[full] --group=test_extra "mne-qt-browser @ https://github.com/mne-tools/mne-qt-browser/archive/refs/heads/main.zip"
displayName: 'Install dependencies with pip'
- bash: |
set -e
Expand Down
5 changes: 5 additions & 0 deletions doc/changes/dev/13899.dependency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Updated minimum for:

- Core dependency ``matplotlib >= 3.9``

Changes implemented via CI action created by `Thomas Binns`_.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies:
- jupyter
- lazy_loader >=0.3
- mamba
- matplotlib >=3.8
- matplotlib >=3.9
- mffpy >=0.5.7
- mne-qt-browser
- nest-asyncio2
Expand Down
13 changes: 6 additions & 7 deletions mne/fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def _compare_version(version_a, operator, version_b):


###############################################################################
# NumPy 2.5 deprecates .shape assignment, but .reshape(copy=False) requires 2.1+
# NumPy 2.5 removes .shape assignment, but .reshape(copy=False) requires 2.1+

# TODO VERSION remove on NumPy 2.1+


def _reshape_view(arr, shape):
Expand All @@ -66,10 +68,8 @@ def _reshape_view(arr, shape):
This function provides compatibility across NumPy versions for reshaping
arrays as views. On NumPy >= 2.1, it uses ``reshape(copy=False)`` which
explicitly fails if a view cannot be created. On older versions, it uses
direct shape assignment which has the same behavior but is deprecated in
NumPy 2.5+.

Can be removed once NumPy 2.1 is the minimum supported version.
direct shape assignment which has the same behavior but is being removed
as of NumPy 2.5+.

Parameters
----------
Expand Down Expand Up @@ -765,8 +765,7 @@ def minimum_phase(h, method="homomorphic", n_fft=None, *, half=True):
return h_minimum[:n_out]


# SciPy 1.15 deprecates sph_harm for sph_harm_y and using it will trigger a
# DeprecationWarning. This is a backport of the new function for older SciPy versions.
# TODO VERSION SciPy 1.15+ (sph_harm -> sph_harm_y)
def sph_harm_y(n, m, theta, phi, *, diff_n=0):
"""Wrap scipy.special.sph_harm for sph_harm_y."""
# Can be removed once we no longer support scipy < 1.15.0
Expand Down
8 changes: 4 additions & 4 deletions mne/time_frequency/tfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ def plot(
cnorm=None,
cmap=None,
colorbar=True,
title=None, # don't deprecate this one; has (useful) option title="auto"
title=None, # keep: has (useful) option title="auto"
mask=None,
mask_style=None,
mask_cmap="Greys",
Expand Down Expand Up @@ -2481,7 +2481,7 @@ def plot_topo(
vmax=None,
layout=None,
cmap="RdBu_r",
title=None, # don't deprecate; topo titles aren't standard (color, size, just.)
title=None, # keep: topo titles aren't standard (color, size, just.)
dB=False,
colorbar=True,
layout_scale=0.945,
Expand Down Expand Up @@ -3432,7 +3432,7 @@ def plot(
cnorm=None,
cmap=None,
colorbar=True,
title=None, # don't deprecate this one; has (useful) option title="auto"
title=None, # keep: has (useful) option title="auto"
mask=None,
mask_style=None,
mask_cmap="Greys",
Expand Down Expand Up @@ -3484,7 +3484,7 @@ def plot_topo(
vmax=None,
layout=None,
cmap=None,
title=None, # don't deprecate; topo titles aren't standard (color, size, just.)
title=None, # keep: topo titles aren't standard (color, size, just.)
dB=False,
colorbar=True,
layout_scale=0.945,
Expand Down
4 changes: 2 additions & 2 deletions mne/utils/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def _convert_times(


def _inplace(df, method, **kwargs):
# TODO VERSION can be removed once pandas>=3.0 is required
# TODO VERSION remove on pandas 3.0+
# Handle transition: inplace=True (pandas <1.5) → copy=False (>=1.5)
# and 3.0 warning:
# E DeprecationWarning: The copy keyword is deprecated and will be removed in a
# The copy keyword will be removed in a
# future version. Copy-on-Write is active in pandas since 3.0 which utilizes a
# lazy copy mechanism that defers copies until necessary. Use .copy() to make
# an eager copy if necessary.
Expand Down
2 changes: 1 addition & 1 deletion mne/utils/spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _split_psd_kwargs(*, plot_fun=None, kwargs=None):


def _convert_old_birthday_format(info):
"""Convert deprecated birthday tuple to datetime."""
"""Convert old birthday tuple to datetime."""
subject_info = info.get("subject_info")
if subject_info is not None:
birthday = subject_info.get("birthday")
Expand Down
4 changes: 3 additions & 1 deletion mne/viz/backends/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ def _init_mne_qtapp(enable_icon=True, pg_app=False, splash=False):
out = app
if splash:
pixmap = QPixmap(f"{icons_path}/mne_splash.png")
pixmap.setDevicePixelRatio(QGuiApplication.primaryScreen().devicePixelRatio())
screen = QGuiApplication.primaryScreen()
ratio = screen.devicePixelRatio() if screen else 1
pixmap.setDevicePixelRatio(ratio)
args = (pixmap,)
if _should_raise_window():
args += (Qt.WindowStaysOnTopHint,)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ dependencies = [
"decorator >= 5.1",
"jinja2 >= 3.1",
"lazy_loader >= 0.3",
"matplotlib >= 3.8", # released 2023-09-15, will become 3.9 on 2026-05-15
"matplotlib >= 3.9", # released 2024-05-15, will become 3.10 on 2026-12-14
"numpy >= 1.26, < 3", # released 2023-09-16, will become 2.0 on 2026-06-16
"packaging",
"pooch >= 1.5",
Expand Down
2 changes: 1 addition & 1 deletion tools/azure_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
STD_ARGS="--progress-bar off --upgrade "
python -m pip install $STD_ARGS pip setuptools wheel
if [ "${TEST_MODE}" == "pip" ]; then
python -m pip install $STD_ARGS --only-binary="numba,llvmlite,numpy,scipy,vtk,dipy,openmeeg" -e .[full] --group=test
python -m pip install $STD_ARGS --only-binary="numba,llvmlite,numpy,scipy,vtk,dipy,openmeeg" -e .[full] --group=test "mne-qt-browser @ https://github.com/mne-tools/mne-qt-browser/archive/refs/heads/main.zip"
elif [ "${TEST_MODE}" == "pip-pre" ]; then
${SCRIPT_DIR}/install_pre_requirements.sh
python -m pip install $STD_ARGS --pre -e . --group=test_extra
Expand Down
10 changes: 5 additions & 5 deletions tools/install_pre_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ echo "::endgroup::"

echo "::group::Everything else"
python -m pip install $STD_ARGS \
"git+https://github.com/pyvista/pyvista" \
"git+https://github.com/pyvista/pyvistaqt" \
"pyvista @ https://github.com/pyvista/pyvista/archive/refs/heads/main.zip" \
"pyvistaqt @ https://github.com/pyvista/pyvistaqt/archive/refs/heads/main.zip" \
"git+https://github.com/nilearn/nilearn" \
"git+https://github.com/pierreablin/picard" \
"git+https://github.com/the-siesta-group/edfio" \
https://gitlab.com/obob/pymatreader/-/archive/master/pymatreader-master.zip \
git+https://github.com/mne-tools/mne-qt-browser \
"https://gitlab.com/obob/pymatreader/-/archive/master/pymatreader-master.zip" \
git+https://github.com/pyqtgraph/pyqtgraph \
git+https://github.com/mne-tools/mne-bids \
"mne-qt-browser @ https://github.com/mne-tools/mne-qt-browser/archive/refs/heads/main.zip" \
"mne-bids @ https://github.com/mne-tools/mne-bids/archive/refs/heads/main.zip" \
git+https://github.com/nipy/nibabel \
git+https://github.com/joblib/joblib \
git+https://github.com/h5io/h5io \
Expand Down
6 changes: 3 additions & 3 deletions tools/pylock.ci-old.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c323

[[packages]]
name = "matplotlib"
version = "3.8.0"
sdist = { url = "https://files.pythonhosted.org/packages/23/e1/77016194621fb1356aafeb2186f07b5dede62ea2043bf03f82325c4fccc5/matplotlib-3.8.0.tar.gz", upload-time = 2023-09-15T04:49:03Z, size = 35864435, hashes = { sha256 = "df8505e1c19d5c2c26aff3497a7cbd3ccfc2e97043d1e4db3e76afa399164b69" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/b5/24/aaccf324ce862bb82277e8814d2aebbb2a2c160d04e95aa2b8c9dc3137a9/matplotlib-3.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2023-09-15T04:50:03Z, size = 11610560, hashes = { sha256 = "d670b9348e712ec176de225d425f150dc8e37b13010d85233c539b547da0be39" } }]
version = "3.9.0"
sdist = { url = "https://files.pythonhosted.org/packages/c5/a4/a7236bf8b0137deff48737c6ccf2154ef4486e57c6a5b7c309bf515992bd/matplotlib-3.9.0.tar.gz", upload-time = 2024-05-15T23:38:15Z, size = 36069890, hashes = { sha256 = "e6d29ea6c19e34b30fb7d88b7081f869a03014f66fe06d62cc77d5a6ea88ed7a" } }
wheels = [{ url = "https://files.pythonhosted.org/packages/a7/68/16e7b9154fae61fb29f0f3450b39b855b89e6d2c598d67302e70f96883af/matplotlib-3.9.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-05-15T23:37:12Z, size = 8296303, hashes = { sha256 = "eaf3978060a106fab40c328778b148f590e27f6fa3cd15a19d6892575bce387d" } }]

[[packages]]
name = "matplotlib-inline"
Expand Down
Loading