Skip to content

Commit

Permalink
Merge branch 'main' into ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Jan 23, 2024
2 parents 0985c89 + e0af51d commit b470b43
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
# Ruff mne
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
rev: v0.1.14
hooks:
- id: ruff
name: ruff lint mne
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- packaging
- numba
- pandas
- pyarrow
- xlrd
- scikit-learn
- h5py
Expand Down
4 changes: 1 addition & 3 deletions mne/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 4 additions & 0 deletions mne/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ full = [
"numba",
"h5py",
"pandas",
"pyarrow", # only needed to avoid a deprecation warning in pandas
"numexpr",
"jupyter",
"python-picard",
Expand Down Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions tools/azure_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tools/github_actions_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b470b43

Please sign in to comment.