Skip to content

Commit 6553b19

Browse files
mne-botautofix-ci[bot]larsoner
authored
MAINT: Update dependency specifiers (#14023)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
1 parent 44c40cd commit 6553b19

7 files changed

Lines changed: 37 additions & 89 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Updated minimum for:
2+
3+
- Core dependency ``numpy >= 2.0, < 3``
4+
- Core dependency ``scipy >= 1.14``
5+
6+
Changes implemented via CI action created by `Thomas Binns`_.

environment.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ dependencies:
1313
- dipy >=0.8
1414
- edfio >=0.4.10
1515
- eeglabio
16+
- ffmpeg =8.1.2
1617
- filelock >=3.18.0
1718
- h5io >=0.2.4
1819
- h5py >=2.4
@@ -36,7 +37,7 @@ dependencies:
3637
- nomkl
3738
- noqt5
3839
- numba >=0.35
39-
- numpy >=1.26,<3
40+
- numpy >=2.0,<3
4041
- openmeeg >=2.5.7
4142
- packaging
4243
- pandas >=2.2,!=3.0.4
@@ -46,15 +47,15 @@ dependencies:
4647
- pyarrow
4748
- pybv
4849
- pymatreader
49-
- PySide6 ==6.10.2
50+
- PySide6 ==6.11.1
5051
- python-neo
5152
- python-picard >=0.4
5253
- pyvista >=0.43
5354
- pyvistaqt >=0.11
5455
- qdarkstyle !=3.2.2
5556
- qtpy
5657
- scikit-learn >=1.5
57-
- scipy >=1.13
58+
- scipy >=1.14
5859
- sip
5960
- snirf
6061
- statsmodels >=0.6
@@ -65,7 +66,7 @@ dependencies:
6566
- trame-pyvista
6667
- trame-vtk
6768
- trame-vuetify
68-
- vtk ==9.6.0
69+
- vtk ==9.6.2
6970
- xlrd
7071
- pip:
7172
- pymef

mne/filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
_setup_cuda_fft_resample,
2323
_smart_pad,
2424
)
25-
from .fixes import _reshape_view, minimum_phase
25+
from .fixes import _reshape_view
2626
from .parallel import parallel_func
2727
from .utils import (
2828
_check_option,
@@ -495,11 +495,11 @@ def _construct_fir_filter(
495495
# construct symmetric (linear phase) filter
496496
if phase == "minimum-half":
497497
h = fir_design(N * 2 - 1, freq, gain, window=fir_window)
498-
h = minimum_phase(h)
498+
h = signal.minimum_phase(h)
499499
else:
500500
h = fir_design(N, freq, gain, window=fir_window)
501501
if phase == "minimum":
502-
h = minimum_phase(h, half=False)
502+
h = signal.minimum_phase(h, half=False)
503503
assert h.size == N
504504
att_db, att_freq = _filter_attenuation(h, freq, gain)
505505
if phase == "zero-double":

mne/fixes.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -694,62 +694,6 @@ def _close_event(fig):
694694

695695

696696
###############################################################################
697-
# TODO VERSION SciPy 1.14+ minimum_phase half=True option
698-
699-
700-
def minimum_phase(h, method="homomorphic", n_fft=None, *, half=True):
701-
"""Wrap scipy.signal.minimum_phase with half option."""
702-
# Can be removed once
703-
from scipy.fft import fft, ifft
704-
from scipy.signal import minimum_phase as sp_minimum_phase
705-
706-
assert isinstance(method, str) and method == "homomorphic"
707-
708-
if "half" in inspect.getfullargspec(sp_minimum_phase).kwonlyargs:
709-
return sp_minimum_phase(h, method=method, n_fft=n_fft, half=half)
710-
h = np.asarray(h)
711-
if np.iscomplexobj(h):
712-
raise ValueError("Complex filters not supported")
713-
if h.ndim != 1 or h.size <= 2:
714-
raise ValueError("h must be 1-D and at least 2 samples long")
715-
n_half = len(h) // 2
716-
if not np.allclose(h[-n_half:][::-1], h[:n_half]):
717-
warnings.warn(
718-
"h does not appear to by symmetric, conversion may fail",
719-
RuntimeWarning,
720-
stacklevel=2,
721-
)
722-
if n_fft is None:
723-
n_fft = 2 ** int(np.ceil(np.log2(2 * (len(h) - 1) / 0.01)))
724-
n_fft = int(n_fft)
725-
if n_fft < len(h):
726-
raise ValueError(f"n_fft must be at least len(h)=={len(h)}")
727-
728-
# zero-pad; calculate the DFT
729-
h_temp = np.abs(fft(h, n_fft))
730-
# take 0.25*log(|H|**2) = 0.5*log(|H|)
731-
h_temp += 1e-7 * h_temp[h_temp > 0].min() # don't let log blow up
732-
np.log(h_temp, out=h_temp)
733-
if half: # halving of magnitude spectrum optional
734-
h_temp *= 0.5
735-
# IDFT
736-
h_temp = ifft(h_temp).real
737-
# multiply pointwise by the homomorphic filter
738-
# lmin[n] = 2u[n] - d[n]
739-
# i.e., double the positive frequencies and zero out the negative ones;
740-
# Oppenheim+Shafer 3rd ed p991 eq13.42b and p1004 fig13.7
741-
win = np.zeros(n_fft)
742-
win[0] = 1
743-
stop = n_fft // 2
744-
win[1:stop] = 2
745-
if n_fft % 2:
746-
win[stop] = 1
747-
h_temp *= win
748-
h_temp = ifft(np.exp(fft(h_temp)))
749-
h_minimum = h_temp.real
750-
751-
n_out = (n_half + len(h) % 2) if half else len(h)
752-
return h_minimum[:n_out]
753697

754698

755699
# TODO VERSION SciPy 1.15+ (sph_harm -> sph_harm_y)

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ doc = [
2020
"pydata-sphinx-theme >= 0.15.2",
2121
"pygments >= 2.13",
2222
"pymef",
23-
"pyvistaqt >= 0.11", # released 2023-06-30, no newer version available
23+
"pyvistaqt >= 0.11", # released 2023-06-30, will become 0.12 on 2028-07-01
2424
"pyxdf",
2525
"pyzmq != 24.0.0",
2626
"scikit-learn >= 1.5", # released 2024-05-21, will become 1.6 on 2026-12-09
@@ -38,7 +38,7 @@ doc-full = ["rpy2", {include-group = "doc"}]
3838
# Dependencies in a separate group for uv lockfile generation, currently only used for
3939
# the 'old' environment CI test run
4040
lockfile_extras = [
41-
"pandas >= 2.2,!=3.0.4", # released 2024-01-20, will become 2.3 on 2027-06-05
41+
"pandas >= 2.2, != 3.0.4", # released 2024-01-20, will become 2.3 on 2027-06-05
4242
"scikit-learn >= 1.5", # released 2024-05-21, will become 1.6 on 2026-12-09
4343
]
4444
test = [
@@ -48,7 +48,7 @@ test = [
4848
"numpydoc >= 1.6",
4949
"pillow >= 10.2",
5050
"pre-commit",
51-
"pytest >= 8.0,!=9.1.0", # https://github.com/pytest-dev/pytest/issues/14591
51+
"pytest >= 8.0, != 9.1.0", # https://github.com/pytest-dev/pytest/issues/14591
5252
"pytest-cov >= 4.1",
5353
"pytest-qt >= 4.3",
5454
"pytest-rerunfailures",
@@ -106,10 +106,10 @@ dependencies = [
106106
"jinja2 >= 3.1",
107107
"lazy_loader >= 0.3",
108108
"matplotlib >= 3.9", # released 2024-05-15, will become 3.10 on 2026-12-14
109-
"numpy >= 1.26, < 3", # released 2023-09-16, will become 2.0 on 2026-06-16
109+
"numpy >= 2.0, < 3", # released 2024-06-16, will become 2.1 on 2026-08-18
110110
"packaging",
111111
"pooch >= 1.5",
112-
"scipy >= 1.13", # released 2024-04-02, will become 1.14 on 2026-06-24
112+
"scipy >= 1.14", # released 2024-06-24, will become 1.15 on 2027-01-03
113113
"tqdm >= 4.66",
114114
]
115115
description = "MNE-Python project for MEG and EEG data analysis."
@@ -169,15 +169,15 @@ full-no-qt = [
169169
"nilearn",
170170
"numba >= 0.35",
171171
"openmeeg >= 2.5.7",
172-
"pandas >= 2.2,!=3.0.4", # released 2024-01-20, will become 2.3 on 2027-06-05
172+
"pandas >= 2.2, != 3.0.4", # released 2024-01-20, will become 2.3 on 2027-06-05
173173
"pillow", # for `Brain.save_image` and `mne.Report`
174174
"pyarrow", # only needed to avoid a deprecation warning in pandas
175175
"pybv",
176176
"pymef",
177177
"pyobjc-framework-Cocoa >= 5.2.0; platform_system == 'Darwin'",
178178
"python-picard >= 0.4",
179179
"pyvista >= 0.43", # released 2023-12-07, will become 0.44 on 2026-07-07
180-
"pyvistaqt >= 0.11", # released 2023-06-30, no newer version available
180+
"pyvistaqt >= 0.11", # released 2023-06-30, will become 0.12 on 2028-07-01
181181
"qdarkstyle != 3.2.2",
182182
"qtpy",
183183
"scikit-learn >= 1.5", # released 2024-05-21, will become 1.6 on 2026-12-09

tools/hooks/update_environment_file.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
deps -= recursive_deps
2626
deps |= {"pip", "mamba", "conda", "nomkl", "noqt5"}
2727
# not on conda-forge
28-
pip_deps = {"pymef"}
28+
pip_deps = {
29+
"pymef", # not on conda-forge
30+
}
2931
deps -= pip_deps
3032

3133

@@ -53,8 +55,8 @@ def split_dep(dep):
5355
conda_dep_lines = set()
5456
version_spec_overrides = {
5557
# Help the solver work faster by specifying these (should be updated periodically):
56-
"PySide6": "==6.10.2",
57-
"vtk": "==9.6.0",
58+
"PySide6": "==6.11.1",
59+
"vtk": "==9.6.2",
5860
}
5961
for key in version_spec_overrides:
6062
assert any(dep.startswith(key) for dep in deps), (
@@ -71,8 +73,9 @@ def split_dep(dep):
7173
# use pip for packages needing e.g. `platform_system` or `python_version` triaging
7274
if ";" in version_spec:
7375
pip_deps.add(line[4:])
74-
else:
76+
elif package_name not in pip_deps:
7577
conda_dep_lines.add(line)
78+
conda_dep_lines.add(" - ffmpeg =8.1.2") # try to fix conda issue
7679

7780
# prepare the pip dependencies section
7881
newline = "\n" # python < 3.12 forbids backslash in {} part of f-string

tools/pylock.ci-old.toml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/88/b2/d0896bdcdc8d28a
254254

255255
[[packages]]
256256
name = "numpy"
257-
version = "1.26.0"
258-
sdist = { url = "https://files.pythonhosted.org/packages/55/b3/b13bce39ba82b7398c06d10446f5ffd5c07db39b09bd37370dc720c7951c/numpy-1.26.0.tar.gz", upload-time = 2023-09-16T20:12:58Z, size = 15633455, hashes = { sha256 = "f93fc78fe8bf15afe2b8d6b6499f1c73953169fad1e9a8dd086cdff3190e7fdf" } }
259-
wheels = [{ url = "https://files.pythonhosted.org/packages/9b/5a/f265a1ba3641d16b5480a217a6aed08cceef09cd173b568cd5351053472a/numpy-1.26.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2023-09-16T19:59:30Z, size = 18181958, hashes = { sha256 = "767254ad364991ccfc4d81b8152912e53e103ec192d1bb4ea6b1f5a7117040be" } }]
257+
version = "2.0.0"
258+
sdist = { url = "https://files.pythonhosted.org/packages/05/35/fb1ada118002df3fe91b5c3b28bc0d90f879b881a5d8f68b1f9b79c44bfe/numpy-2.0.0.tar.gz", upload-time = 2024-06-16T13:24:44Z, size = 18326228, hashes = { sha256 = "cf5d1c9e6837f8af9f92b6bd3e86d513cdc11f60fd62185cc49ec7d1aba34864" } }
259+
wheels = [{ url = "https://files.pythonhosted.org/packages/d6/a8/6a2419c40c7b6f7cb4ef52c532c88e55490c4fa92885964757d507adddce/numpy-2.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-06-16T13:08:22Z, size = 19282097, hashes = { sha256 = "6d7696c615765091cc5093f76fd1fa069870304beaccfd58b5dcc69e55ef49c1" } }]
260260

261261
[[packages]]
262262
name = "numpydoc"
@@ -277,9 +277,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/d8/5b/3098db49a61ccc8
277277

278278
[[packages]]
279279
name = "pandas"
280-
version = "2.2.0"
281-
sdist = { url = "https://files.pythonhosted.org/packages/03/d2/6fb05f20ee1b3961c7b283c1f8bafc6de752155d075c5db61c173de0de62/pandas-2.2.0.tar.gz", upload-time = 2024-01-20T02:53:59Z, size = 4390211, hashes = { sha256 = "30b83f7c3eb217fb4d1b494a57a2fda5444f17834f5df2de6b2ffff68dc3c8e2" } }
282-
wheels = [{ url = "https://files.pythonhosted.org/packages/b3/b3/3102c3a4abca1093e50cfec2213102a1c65c0b318a4431395d0121e6e690/pandas-2.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-01-20T02:19:14Z, size = 13010773, hashes = { sha256 = "20404d2adefe92aed3b38da41d0847a143a09be982a31b85bc7dd565bdba0f4e" } }]
280+
version = "2.2.2"
281+
sdist = { url = "https://files.pythonhosted.org/packages/88/d9/ecf715f34c73ccb1d8ceb82fc01cd1028a65a5f6dbc57bfa6ea155119058/pandas-2.2.2.tar.gz", upload-time = 2024-04-10T19:45:48Z, size = 4398391, hashes = { sha256 = "9e79019aba43cb4fda9e4d983f8e88ca0373adbb697ae9c6c43093218de28b54" } }
282+
wheels = [{ url = "https://files.pythonhosted.org/packages/89/1b/12521efcbc6058e2673583bb096c2b5046a9df39bd73eca392c1efed24e5/pandas-2.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-04-10T19:44:19Z, size = 13032214, hashes = { sha256 = "8635c16bf3d99040fdf3ca3db669a7250ddf49c55dc4aa8fe0ae0fa8d6dcc1f0" } }]
283283

284284
[[packages]]
285285
name = "parso"
@@ -454,9 +454,9 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/1e/7d/1a2ea8eb5b4df37
454454

455455
[[packages]]
456456
name = "scipy"
457-
version = "1.13.0"
458-
sdist = { url = "https://files.pythonhosted.org/packages/fb/a3/328965862f41ba67d27ddd26205962007ec87d99eec6d364a29bf00ac093/scipy-1.13.0.tar.gz", upload-time = 2024-04-02T21:48:22Z, size = 57204550, hashes = { sha256 = "58569af537ea29d3f78e5abd18398459f195546bb3be23d16677fb26616cc11e" } }
459-
wheels = [{ url = "https://files.pythonhosted.org/packages/b9/9d/39dbcf49a793157f9d4f5b8961855677eb4dbb4b82700dcee7042ad2310c/scipy-1.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-04-02T21:41:39Z, size = 38568731, hashes = { sha256 = "b8434f6f3fa49f631fae84afee424e2483289dfc30a47755b4b4e6b07b2633a4" } }]
457+
version = "1.14.0"
458+
sdist = { url = "https://files.pythonhosted.org/packages/4e/e5/0230da034a2e1b1feb32621d7cd57c59484091d6dccc9e6b855b0d309fc9/scipy-1.14.0.tar.gz", upload-time = 2024-06-24T20:35:18Z, size = 58618870, hashes = { sha256 = "b5923f48cb840380f9854339176ef21763118a7300a88203ccd0bdd26e58527b" } }
459+
wheels = [{ url = "https://files.pythonhosted.org/packages/e2/20/15c8fe0dfebb6facd81b3d08bf45dfa080e305deb17172b0a40eba59e927/scipy-1.14.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", upload-time = 2024-06-24T20:32:25Z, size = 41135959, hashes = { sha256 = "42470ea0195336df319741e230626b6225a740fd9dce9642ca13e98f667047c0" } }]
460460

461461
[[packages]]
462462
name = "setuptools"
@@ -627,9 +627,3 @@ name = "webob"
627627
version = "1.8.9"
628628
sdist = { url = "https://files.pythonhosted.org/packages/85/0b/1732085540b01f65e4e7999e15864fe14cd18b12a95731a43fd6fd11b26a/webob-1.8.9.tar.gz", upload-time = 2024-10-24T03:19:20Z, size = 279775, hashes = { sha256 = "ad6078e2edb6766d1334ec3dee072ac6a7f95b1e32ce10def8ff7f0f02d56589" } }
629629
wheels = [{ url = "https://files.pythonhosted.org/packages/50/bd/c336448be43d40be28e71f2e0f3caf7ccb28e2755c58f4c02c065bfe3e8e/WebOb-1.8.9-py2.py3-none-any.whl", upload-time = 2024-10-24T03:19:18Z, size = 115364, hashes = { sha256 = "45e34c58ed0c7e2ecd238ffd34432487ff13d9ad459ddfd77895e67abba7c1f9" } }]
630-
631-
[[packages]]
632-
name = "wheel"
633-
version = "0.21.0"
634-
sdist = { url = "https://files.pythonhosted.org/packages/2a/a3/7a0a7d058bcaf0b08a50e7d55d5426522374ee466316489cc853d0d26dc1/wheel-0.21.0.tar.gz", upload-time = 2013-07-20T16:21:20Z, size = 39310, hashes = { sha256 = "68ad3e66560e9df1f1f435b480183ba24ef913da26556af9e5ae16cd94dd26e1" } }
635-
wheels = [{ url = "https://files.pythonhosted.org/packages/0d/e6/60c6e03ae967d076e72ec5298cd136d658e4b8eb6773d6aef3ff1abc8d04/wheel-0.21.0-py2.py3-none-any.whl", upload-time = 2013-07-20T16:21:03Z, size = 54184, hashes = { sha256 = "b0798123cd67a763637991812ab866f609a81516228273e89270d4bc91b276cd" } }]

0 commit comments

Comments
 (0)