Skip to content

Commit

Permalink
Pin NumPy < 2.0 for now (#224)
Browse files Browse the repository at this point in the history
* Try NumPy 2.0

* Pin to < 2.0

* Test Numba on Python 3.12

* Fix unused import

* Fix Ruff import order

* Fix imports (for real)
  • Loading branch information
cbrnr authored Jun 17, 2024
1 parent 84976e6 commit 9122208
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
rev: v0.4.9
hooks:
- id: ruff
args: [ --fix ]
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools", "setuptools-scm", "oldest-supported-numpy"]
requires = ["setuptools", "setuptools-scm", "numpy"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -27,7 +27,7 @@ classifiers = [
]
keywords = ["sleep", "ecg", "qrs", "peak"]
dependencies = [
"numpy >= 1.20.0",
"numpy >= 1.25.0, < 2.0.0",
"PyYAML >= 5.4.0",
"requests >= 2.25.0",
"scipy >= 1.7.0",
Expand Down
9 changes: 1 addition & 8 deletions tests/test_heartbeats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

"""Tests for heartbeat detection and detector evaluation."""

from sys import version_info

import numpy as np
import pytest
from sleepecg import compare_heartbeats, detect_heartbeats, read_mitdb
Expand Down Expand Up @@ -34,12 +32,7 @@ def mitdb_234_MLII():
"backend",
[
"c",
pytest.param(
"numba",
marks=pytest.mark.skipif(
version_info >= (3, 12), reason="Numba does not support Python 3.12 yet"
),
),
"numba",
"python",
],
)
Expand Down

0 comments on commit 9122208

Please sign in to comment.