Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies for NumPy 2 compatibility #511

Merged
merged 58 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
bdc7c7f
Bump dependencies for NumPy 2 compatibility
cbrnr Oct 23, 2024
a7ab06f
Fix CI
cbrnr Oct 23, 2024
03be479
Bump scipy for Python 3.13
cbrnr Oct 23, 2024
ebfa756
Bump Python to 3.10
cbrnr Oct 23, 2024
11c001b
Include Python 3.9 again
cbrnr Oct 25, 2024
8a48648
Try to replace uv run
cbrnr Nov 18, 2024
5e15a41
Downgrade scipy
cbrnr Nov 18, 2024
bb7e98f
Run as module
cbrnr Nov 18, 2024
d70a0dd
Back to uv run
cbrnr Nov 18, 2024
1d9f9c1
Use --system option
cbrnr Nov 18, 2024
9ec5be8
Revert
cbrnr Nov 18, 2024
f61bc1b
Sync
cbrnr Nov 18, 2024
a8e4ee9
Try forking
cbrnr Nov 18, 2024
4f2b82b
Try >= 3.10
cbrnr Nov 19, 2024
ec8f039
Try with setup-python action
cbrnr Nov 19, 2024
30e50cf
Revert "Try with setup-python action"
cbrnr Nov 19, 2024
b59f4ad
Remove 3.13 (and add 3.9) for now
cbrnr Nov 19, 2024
e0a0d02
Force numpy >= 2.0.0
cbrnr Nov 19, 2024
14a4258
Revert to numpy >= 1.26.4
cbrnr Nov 26, 2024
6e7423d
Use uv pip
cbrnr Nov 26, 2024
a51ee56
Activate venv
cbrnr Nov 26, 2024
6839f64
Use system Python
cbrnr Nov 26, 2024
8155d85
Use setup-python
cbrnr Nov 26, 2024
f646425
Ping
cbrnr Nov 26, 2024
4836714
Add 3.13
cbrnr Nov 26, 2024
ee22dc4
Split jobs
cbrnr Nov 26, 2024
bf1917c
Rename
cbrnr Nov 26, 2024
ed08257
Remove numpy matrix
cbrnr Nov 26, 2024
9be66c1
Fix name for Debian test
cbrnr Nov 26, 2024
9b5c046
Downgrade pandas
cbrnr Nov 26, 2024
eb7f250
Revert pandas
cbrnr Nov 26, 2024
392d420
Numpy matrix
cbrnr Nov 26, 2024
9d09a00
Fix matrix
cbrnr Nov 26, 2024
8e90adb
Temporarily remove Debian
cbrnr Nov 26, 2024
31e8463
Re-enable
cbrnr Nov 26, 2024
3acea30
Test single OS
cbrnr Nov 26, 2024
cb7b529
Fix name
cbrnr Nov 26, 2024
96c2e3b
Remove quotes
cbrnr Nov 26, 2024
14eaa44
Forgot $
cbrnr Nov 26, 2024
100aaed
Try single command
cbrnr Nov 26, 2024
556a4d3
Simplify matrix
cbrnr Nov 26, 2024
b3a5498
Add OS name
cbrnr Nov 26, 2024
25b75c1
Improve name
cbrnr Nov 26, 2024
802fd3a
Revert
cbrnr Nov 26, 2024
9e8136d
Try another variant
cbrnr Nov 26, 2024
a9c7b74
OK forget it
cbrnr Nov 26, 2024
e2692f2
Only test NumPy 1.26.4 on Python 3.9
cbrnr Nov 26, 2024
c8ba35e
Try with condition
cbrnr Nov 26, 2024
ab64860
Use weak_and_warn
cbrnr Nov 26, 2024
ed25100
Don't fail fast
cbrnr Nov 26, 2024
96a52bb
Fix syntax
cbrnr Nov 26, 2024
ba4e1ab
Fix invalid escape sequence
cbrnr Nov 26, 2024
102e60c
Fix dtype promotion warning
cbrnr Nov 26, 2024
0d2a505
Try again
cbrnr Nov 26, 2024
99c7f7b
Maybe better
cbrnr Nov 26, 2024
fd12ec1
Use uv run again
cbrnr Jan 15, 2025
397c09d
Better name
cbrnr Jan 15, 2025
ec5e24f
Revert
cbrnr Jan 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build documentation
run: |
cd docs
make html
51 changes: 21 additions & 30 deletions .github/workflows/run-tests.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Link repository with GitHub Actions
# https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions
name: Test

name: run-tests
on:
push:
branches:
Expand All @@ -10,30 +8,38 @@ on:
branches:
- main

# Set the language, install dependencies, and run the tests
env:
NPY_PROMOTION_STATE: weak_and_warn

tompollard marked this conversation as resolved.
Show resolved Hide resolved
jobs:
build:
runs-on: ${{ matrix.os }}
test:
name: Python ${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.numpy }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
numpy: ["numpy"]
include:
- os: ubuntu-latest
python-version: "3.9"
numpy: "numpy==1.26.4"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v3
- uses: astral-sh/setup-uv@v3
- name: Install Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install libsndfile
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install -y libsndfile1
run: sudo apt-get install -y libsndfile1
- name: Run tests
run: uv run --extra dev pytest
- name: Check source code format
run: uv run --with ${{ matrix.numpy }} --extra dev pytest
- name: Check style
run: uv run --extra dev black --check --diff .

test-deb10-i386:
name: Python 3.7 on Debian 10 i386
runs-on: ubuntu-latest
container: i386/debian:10
steps:
Expand All @@ -49,26 +55,11 @@ jobs:
python3-soundfile \
python3-pytest \
git

python3 --version
# Note: "actions/checkout@v2" requires libstdc++6:amd64 to be
# installed in the container. To keep things simple, use
# "actions/checkout@v1" instead.
# https://github.com/actions/checkout/issues/334
- uses: actions/checkout@v1

- name: Run tests
run: |
pytest-3

build-documentation:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r docs/requirements.txt
- name: Build documentation
run: |
cd docs
make html
run: pytest-3
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version: 2
build:
os: "ubuntu-20.04"
tools:
python: "3.9"
python: "3.10"

# Build from the docs/ directory with Sphinx
sphinx:
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ description = "The WFDB Python package: tools for reading, writing, and processi
authors = [{name = "The Laboratory for Computational Physiology", email = "[email protected]"}]
license = {text = "MIT License"}
readme = "README.md"
requires-python = ">= 3.8"
requires-python = ">= 3.9"
dependencies = [
"numpy >= 1.10.1, < 2.0.0",
"scipy >= 1.0.0",
"pandas >= 1.3.0",
"numpy >= 1.26.4",
"scipy >= 1.13.0",
"pandas >= 2.2.3",
"soundfile >= 0.10.0",
"matplotlib >= 3.2.2",
"requests >= 2.8.1",
Expand All @@ -35,7 +35,7 @@ documentation = "https://wfdb.readthedocs.io/"

[tool.black]
line-length = 80
target-version = ['py37']
target-version = ["py39"]

[tool.hatch.build.targets.sdist]
exclude = [
Expand Down
2 changes: 1 addition & 1 deletion wfdb/processing/peaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def find_peaks(sig):
"""
r"""
tompollard marked this conversation as resolved.
Show resolved Hide resolved
Find hard peaks and soft peaks in a signal, defined as follows:

- Hard peak: a peak that is either /\ or \/.
Expand Down
Loading