diff --git a/environment.yml b/environment.yml index 96c89fe472b..56a5cf37523 100644 --- a/environment.yml +++ b/environment.yml @@ -14,6 +14,7 @@ dependencies: - packaging - numba - pandas + - pyarrow - xlrd - scikit-learn - h5py diff --git a/mne/annotations.py b/mne/annotations.py index cc4209bf898..f0f88783b68 100644 --- a/mne/annotations.py +++ b/mne/annotations.py @@ -1616,9 +1616,7 @@ def events_from_annotations( inds = values = np.array([]).astype(int) for annot in annotations[event_sel]: annot_offset = annot["onset"] + annot["duration"] - _onsets = np.arange( - start=annot["onset"], stop=annot_offset, step=chunk_duration - ) + _onsets = np.arange(annot["onset"], annot_offset, chunk_duration) good_events = annot_offset - _onsets >= chunk_duration if good_events.any(): _onsets = _onsets[good_events] diff --git a/mne/conftest.py b/mne/conftest.py index f41bfa1374c..42f1e26c1e7 100644 --- a/mne/conftest.py +++ b/mne/conftest.py @@ -196,6 +196,10 @@ def pytest_configure(config): ignore:ast\.NameConstant is deprecated and will be removed in Python 3\.14.*:DeprecationWarning # pooch ignore:Python 3\.14 will, by default, filter extracted tar archives.*:DeprecationWarning + # pandas + ignore:\n*Pyarrow will become a required dependency of pandas.*:DeprecationWarning + # pyvista <-> NumPy 2.0 + ignore:__array_wrap__ must accept context and return_scalar arguments.*:DeprecationWarning """ # noqa: E501 for warning_line in warning_lines.split("\n"): warning_line = warning_line.strip() diff --git a/mne/io/fiff/tests/test_raw_fiff.py b/mne/io/fiff/tests/test_raw_fiff.py index fa3f04be0c7..f2269b0cb51 100644 --- a/mne/io/fiff/tests/test_raw_fiff.py +++ b/mne/io/fiff/tests/test_raw_fiff.py @@ -7,6 +7,7 @@ import os import pathlib import pickle +import platform import shutil import sys from copy import deepcopy @@ -42,6 +43,7 @@ assert_and_remove_boundary_annot, assert_object_equal, catch_logging, + check_version, requires_mne, run_subprocess, ) @@ -1023,6 +1025,8 @@ def test_proj(tmp_path): @pytest.mark.parametrize("preload", [False, True, "memmap.dat"]) def test_preload_modify(preload, tmp_path): """Test preloading and modifying data.""" + if platform.system() == "Windows" and check_version("numpy", "2.0.0dev"): + pytest.skip("Problem on Windows, see numpy/issues/25665") rng = np.random.RandomState(0) raw = read_raw_fif(fif_fname, preload=preload) @@ -1926,6 +1930,8 @@ def test_equalize_channels(): def test_memmap(tmp_path): """Test some interesting memmapping cases.""" # concatenate_raw + if platform.system() == "Windows" and check_version("numpy", "2.0.0dev"): + pytest.skip("Problem on Windows, see numpy/issues/25665") memmaps = [str(tmp_path / str(ii)) for ii in range(3)] raw_0 = read_raw_fif(test_fif_fname, preload=memmaps[0]) assert raw_0._data.filename == memmaps[0] diff --git a/pyproject.toml b/pyproject.toml index abb2e1b3f1b..824f3155148 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,6 +72,7 @@ full = [ "numba", "h5py", "pandas", + "pyarrow", # only needed to avoid a deprecation warning in pandas "numexpr", "jupyter", "python-picard", @@ -109,7 +110,7 @@ full = [ # Dependencies for running the test infrastructure test = [ - "pytest!=8.0.0rc1", + "pytest!=8.0.0rc1,!=8.0.0rc2", "pytest-cov", "pytest-timeout", "pytest-harvest", diff --git a/tools/azure_dependencies.sh b/tools/azure_dependencies.sh index cce220a8188..9ee566f3c30 100755 --- a/tools/azure_dependencies.sh +++ b/tools/azure_dependencies.sh @@ -8,12 +8,7 @@ elif [ "${TEST_MODE}" == "pip-pre" ]; then STD_ARGS="$STD_ARGS --pre" python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://www.riverbankcomputing.com/pypi/simple" "PyQt6!=6.6.1" PyQt6-sip PyQt6-Qt6 "PyQt6-Qt6!=6.6.1" echo "Numpy etc." - # See github_actions_dependencies.sh for comments - # Until https://github.com/scipy/scipy/issues/19605 and - # https://github.com/scipy/scipy/issues/19713 are resolved, we can't use the NumPy - # 2.0 wheels :( - python -m pip install $STD_ARGS --only-binary numpy scipy h5py - python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" scikit-learn matplotlib statsmodels + python -m pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "numpy>=2.0.0.dev0" "scipy>=1.12.0.dev0" "scikit-learn>=1.5.dev0" matplotlib pillow statsmodels pyarrow # echo "dipy" # python -m pip install $STD_ARGS --only-binary ":all:" --extra-index-url "https://pypi.anaconda.org/scipy-wheels-nightly/simple" dipy # echo "OpenMEEG" diff --git a/tools/github_actions_dependencies.sh b/tools/github_actions_dependencies.sh index 4c4fb9eb3c2..b801b458dc8 100755 --- a/tools/github_actions_dependencies.sh +++ b/tools/github_actions_dependencies.sh @@ -28,7 +28,7 @@ else echo "PyQt6" pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url https://www.riverbankcomputing.com/pypi/simple "PyQt6!=6.6.1" "PyQt6-Qt6!=6.6.1" echo "NumPy/SciPy/pandas etc." - pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "numpy>=2.0.0.dev0" "scipy>=1.12.0.dev0" "scikit-learn==1.4.dev0" matplotlib pillow statsmodels + pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "numpy>=2.0.0.dev0" "scipy>=1.12.0.dev0" "scikit-learn>=1.5.dev0" matplotlib pillow statsmodels pyarrow # No pandas, dipy, h5py, openmeeg, python-picard (needs numexpr) until they update to NumPy 2.0 compat INSTALL_KIND="test_extra" # echo "dipy"