Skip to content

Commit

Permalink
Check if Python 3.12 works (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr authored Oct 9, 2023
1 parent 1f4a32a commit 84143b7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
{name = "Florian Hofer", email = "hofaflo@gmail.com"},
{name = "Clemens Brunner", email = "clemens.brunner@gmail.com"},
]
requires-python = ">=3.8,<3.12"
requires-python = ">=3.8"
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
Expand All @@ -36,8 +36,8 @@ full = [ # complete package functionality
"joblib >= 1.0.0",
"matplotlib >= 3.5.0",
"mne >= 1.0.0",
"numba >= 0.55.0",
"tensorflow >= 2.7.0",
"numba >= 0.55.0; python_version < '3.12'",
"tensorflow >= 2.7.0; python_version < '3.12'",
"wfdb >= 3.4.0",
]

Expand All @@ -49,13 +49,13 @@ dev = [ # everything needed for development
"mkdocstrings-python >= 0.7.1",
"mne >= 1.0.0",
"mypy >= 0.991",
"numba >= 0.55.0",
"numba >= 0.55.0; python_version < '3.12'",
"pre-commit >= 2.13.0",
"pyEDFlib >= 0.1.25",
"pytest >= 6.2.0",
"ruff >= 0.0.263",
"setuptools >= 56.0.0",
"tensorflow >= 2.7.0",
"tensorflow >= 2.7.0; python_version < '3.12'",
"wfdb >= 3.4.0",
]

Expand All @@ -66,7 +66,7 @@ doc = [ # RTD uses this when building the documentation

cibw = [ # cibuildwheel uses this for running the test suite
"mne >= 1.0.0",
"numba >= 0.55.0",
"numba >= 0.55.0; python_version < '3.12'",
"pyEDFlib >= 0.1.25",
"wfdb >= 3.4.0",
]
Expand Down Expand Up @@ -111,6 +111,7 @@ filterwarnings = [
"error",
'ignore:.*sample_rate:DeprecationWarning:pyedflib',
'ignore:.*pkg_resources:DeprecationWarning',
'ignore:.*datetime.datetime.utcfromtimestamp\(\):DeprecationWarning',
]

[tool.ruff]
Expand Down
16 changes: 15 additions & 1 deletion sleepecg/test/test_heartbeats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

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

from sys import version_info

import numpy as np
import pytest

Expand All @@ -29,7 +31,19 @@ def mitdb_234_MLII():
return next(read_mitdb(records_pattern="234"))


@pytest.mark.parametrize("backend", ["c", "numba", "python"])
@pytest.mark.parametrize(
"backend",
[
"c",
pytest.param(
"numba",
marks=pytest.mark.skipif(
version_info >= (3, 12), reason="Numba does not support Python 3.12 yet"
),
),
"python",
],
)
def test_detect_heartbeats(mitdb_234_MLII, backend):
"""Test heartbeat detection on mitdb:234:MLII."""
record = mitdb_234_MLII
Expand Down

0 comments on commit 84143b7

Please sign in to comment.