From bdc7c7f27dc7f24e8ce5063520f2f486132365e2 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:30:20 +0200 Subject: [PATCH 01/58] Bump dependencies for NumPy 2 compatibility --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 09fbdad9..cb00931b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,11 +8,11 @@ description = "The WFDB Python package: tools for reading, writing, and processi authors = [{name = "The Laboratory for Computational Physiology", email = "contact@physionet.org"}] license = {text = "MIT License"} readme = "README.md" -requires-python = ">= 3.8" +requires-python = ">= 3.9" dependencies = [ - "numpy >= 1.10.1, < 2.0.0", + "numpy >= 1.26.4", "scipy >= 1.0.0", - "pandas >= 1.3.0", + "pandas >= 2.2.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", "requests >= 2.8.1", @@ -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 = [ From a7ab06fd9c837645485d7f53716654e7ea108996 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:49:15 +0200 Subject: [PATCH 02/58] Fix CI --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index dc0d322e..6b9f44c9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -17,7 +17,7 @@ jobs: strategy: 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"] steps: - uses: actions/checkout@v4 - name: Setup uv From 03be4793f571530ed15eb0979c44b35ca499535a Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:51:08 +0200 Subject: [PATCH 03/58] Bump scipy for Python 3.13 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cb00931b..b28c73f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ readme = "README.md" requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", - "scipy >= 1.0.0", + "scipy >= 1.14.1", "pandas >= 2.2.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", From ebfa75699918cdfc443baa3fc347592a997ac06d Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:53:11 +0200 Subject: [PATCH 04/58] Bump Python to 3.10 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b28c73f3..4c8d56f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ description = "The WFDB Python package: tools for reading, writing, and processi authors = [{name = "The Laboratory for Computational Physiology", email = "contact@physionet.org"}] license = {text = "MIT License"} readme = "README.md" -requires-python = ">= 3.9" +requires-python = ">= 3.10" dependencies = [ "numpy >= 1.26.4", "scipy >= 1.14.1", From 11c001be1806a38e41f1283040079e5a7ca7fa18 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Fri, 25 Oct 2024 10:23:34 +0200 Subject: [PATCH 05/58] Include Python 3.9 again --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4c8d56f1..b28c73f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ description = "The WFDB Python package: tools for reading, writing, and processi authors = [{name = "The Laboratory for Computational Physiology", email = "contact@physionet.org"}] license = {text = "MIT License"} readme = "README.md" -requires-python = ">= 3.10" +requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", "scipy >= 1.14.1", From 8a48648f34a00056facb4e3b9c3b589ae6042e1f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:31:09 +0100 Subject: [PATCH 06/58] Try to replace uv run --- .github/workflows/run-tests.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 6b9f44c9..873d6e86 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -23,15 +23,19 @@ jobs: - name: Setup uv uses: astral-sh/setup-uv@v3 - name: Install Python ${{ matrix.python-version }} - run: uv python install ${{ matrix.python-version }} + run: | + uv python install ${{ matrix.python-version }} + uv venv + uv pip install -e ".[dev]" + source .venv/bin/activate - name: Install libsndfile if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get install -y libsndfile1 - name: Run tests - run: uv run --extra dev pytest + run: pytest - name: Check source code format - run: uv run --extra dev black --check --diff . + run: black --check --diff . test-deb10-i386: runs-on: ubuntu-latest From 5e15a411887b7c67679db4b56663d141a6fac1c4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:34:18 +0100 Subject: [PATCH 07/58] Downgrade scipy --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b28c73f3..14080e5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ readme = "README.md" requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", - "scipy >= 1.14.1", + "scipy >= 1.13.0", "pandas >= 2.2.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", From bb7e98f1be53b210d46ffdfc70fdd6c9983c0a29 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:36:02 +0100 Subject: [PATCH 08/58] Run as module --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 873d6e86..8e6b4944 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -33,9 +33,9 @@ jobs: run: | sudo apt-get install -y libsndfile1 - name: Run tests - run: pytest + run: python -m pytest - name: Check source code format - run: black --check --diff . + run: python -m black --check --diff . test-deb10-i386: runs-on: ubuntu-latest From d70a0dd9311605afc57117be4e9a3251b166361c Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:38:57 +0100 Subject: [PATCH 09/58] Back to uv run --- .github/workflows/run-tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8e6b4944..9dc161b0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -27,15 +27,14 @@ jobs: uv python install ${{ matrix.python-version }} uv venv uv pip install -e ".[dev]" - source .venv/bin/activate - name: Install libsndfile if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get install -y libsndfile1 - name: Run tests - run: python -m pytest + run: uv run pytest - name: Check source code format - run: python -m black --check --diff . + run: uv run black --check --diff . test-deb10-i386: runs-on: ubuntu-latest From 1d9f9c189d8208ca1ed533315c269136dd44a318 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:41:36 +0100 Subject: [PATCH 10/58] Use --system option --- .github/workflows/run-tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9dc161b0..e683a80c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,7 +10,9 @@ on: branches: - main -# Set the language, install dependencies, and run the tests +env: + UV_SYSTEM_PYTHON: 1 + jobs: build: runs-on: ${{ matrix.os }} @@ -25,16 +27,15 @@ jobs: - name: Install Python ${{ matrix.python-version }} run: | uv python install ${{ matrix.python-version }} - uv venv uv pip install -e ".[dev]" - name: Install libsndfile if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get install -y libsndfile1 - name: Run tests - run: uv run pytest + run: pytest - name: Check source code format - run: uv run black --check --diff . + run: black --check --diff . test-deb10-i386: runs-on: ubuntu-latest From 9ec5be84341592b8ecadf0a85f1b26ef95bf21e1 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:45:52 +0100 Subject: [PATCH 11/58] Revert --- .github/workflows/run-tests.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e683a80c..309baaf8 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,9 +10,6 @@ on: branches: - main -env: - UV_SYSTEM_PYTHON: 1 - jobs: build: runs-on: ${{ matrix.os }} @@ -25,17 +22,15 @@ jobs: - name: Setup uv uses: astral-sh/setup-uv@v3 - name: Install Python ${{ matrix.python-version }} - run: | - uv python install ${{ matrix.python-version }} - uv pip install -e ".[dev]" + run: uv python install ${{ matrix.python-version }} - name: Install libsndfile if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get install -y libsndfile1 - name: Run tests - run: pytest + run: uv run pytest - name: Check source code format - run: black --check --diff . + run: uv run black --check --diff . test-deb10-i386: runs-on: ubuntu-latest From f61bc1b18207468813fa337973f2039598c52a75 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:50:34 +0100 Subject: [PATCH 12/58] Sync --- .github/workflows/run-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 309baaf8..b8e47eb5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -27,6 +27,8 @@ jobs: if: startsWith(matrix.os, 'ubuntu') run: | sudo apt-get install -y libsndfile1 + - name: Install dependencies + run: uv sync --all-extras - name: Run tests run: uv run pytest - name: Check source code format From a8e4ee9c770ac30e4e4cb9e27b3cd959d3e4d708 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 15:42:42 +0100 Subject: [PATCH 13/58] Try forking --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14080e5c..86ecf1cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,8 @@ readme = "README.md" requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", - "scipy >= 1.13.0", + "scipy >= 1.13.0; python_version >= '3.9'", + "scipy >= 1.14.0; python_version >= '3.10'", "pandas >= 2.2.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", From 4f2b82ba6ea3a63bb87832a334b3a66bd6dc9f64 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 08:05:37 +0100 Subject: [PATCH 14/58] Try >= 3.10 --- .readthedocs.yml | 2 +- pyproject.toml | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 9fedd977..7d45d867 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 86ecf1cf..96aaf5a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,11 +8,10 @@ description = "The WFDB Python package: tools for reading, writing, and processi authors = [{name = "The Laboratory for Computational Physiology", email = "contact@physionet.org"}] license = {text = "MIT License"} readme = "README.md" -requires-python = ">= 3.9" +requires-python = ">= 3.10" dependencies = [ "numpy >= 1.26.4", - "scipy >= 1.13.0; python_version >= '3.9'", - "scipy >= 1.14.0; python_version >= '3.10'", + "scipy >= 1.14.0", "pandas >= 2.2.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", @@ -36,7 +35,7 @@ documentation = "https://wfdb.readthedocs.io/" [tool.black] line-length = 80 -target-version = ["py39"] +target-version = ["py310"] [tool.hatch.build.targets.sdist] exclude = [ From ec8f03931f0a7c3d2c6d80fb7057733afff51633 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 08:57:09 +0100 Subject: [PATCH 15/58] Try with setup-python action --- .github/workflows/run-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b8e47eb5..e50f3dae 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,10 +19,10 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - - name: Setup uv - uses: astral-sh/setup-uv@v3 - - name: Install Python ${{ matrix.python-version }} - run: uv python install ${{ matrix.python-version }} + - uses: astral-sh/setup-uv@v3 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Install libsndfile if: startsWith(matrix.os, 'ubuntu') run: | From 30e50cfeee6f2a5256470f3c12cbe67cbb5bbd55 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 09:12:24 +0100 Subject: [PATCH 16/58] Revert "Try with setup-python action" This reverts commit 2349a410ac15197a02f868cd24b88d4d5ea29ce9. --- .github/workflows/run-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e50f3dae..b8e47eb5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,10 +19,10 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Setup uv + 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: | From b59f4ad70e2ceef3410049dc4d44eabae606f8cd Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 09:20:42 +0100 Subject: [PATCH 17/58] Remove 3.13 (and add 3.9) for now --- .github/workflows/run-tests.yml | 2 +- pyproject.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b8e47eb5..8074617e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - name: Setup uv diff --git a/pyproject.toml b/pyproject.toml index 96aaf5a6..14080e5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,10 +8,10 @@ description = "The WFDB Python package: tools for reading, writing, and processi authors = [{name = "The Laboratory for Computational Physiology", email = "contact@physionet.org"}] license = {text = "MIT License"} readme = "README.md" -requires-python = ">= 3.10" +requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", - "scipy >= 1.14.0", + "scipy >= 1.13.0", "pandas >= 2.2.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", @@ -35,7 +35,7 @@ documentation = "https://wfdb.readthedocs.io/" [tool.black] line-length = 80 -target-version = ["py310"] +target-version = ["py39"] [tool.hatch.build.targets.sdist] exclude = [ From e0a0d02d87352ab2041ce6bf70fefd8792c06f04 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 10:45:33 +0100 Subject: [PATCH 18/58] Force numpy >= 2.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14080e5c..b4bda8e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ license = {text = "MIT License"} readme = "README.md" requires-python = ">= 3.9" dependencies = [ - "numpy >= 1.26.4", + "numpy >= 2.0.0", "scipy >= 1.13.0", "pandas >= 2.2.0", "soundfile >= 0.10.0", From 14a425884e29b29a9eb2987548947da3b1282a94 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:42:10 +0100 Subject: [PATCH 19/58] Revert to numpy >= 1.26.4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b4bda8e5..14080e5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ license = {text = "MIT License"} readme = "README.md" requires-python = ">= 3.9" dependencies = [ - "numpy >= 2.0.0", + "numpy >= 1.26.4", "scipy >= 1.13.0", "pandas >= 2.2.0", "soundfile >= 0.10.0", From 6e7423d2daf33b90a60ec41f66df86b83bd04925 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:45:11 +0100 Subject: [PATCH 20/58] Use uv pip --- .github/workflows/run-tests.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8074617e..cbb56971 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -28,11 +28,14 @@ jobs: run: | sudo apt-get install -y libsndfile1 - name: Install dependencies - run: uv sync --all-extras + run: | + uv venv + source .venv/bin/activate + uv pip install ".[dev]" - name: Run tests - run: uv run pytest + run: pytest - name: Check source code format - run: uv run black --check --diff . + run: black --check --diff . test-deb10-i386: runs-on: ubuntu-latest From a51ee56643e882a9a6f703717cbd1892f853f3b0 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:46:53 +0100 Subject: [PATCH 21/58] Activate venv --- .github/workflows/run-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cbb56971..026e2ef0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -30,10 +30,11 @@ jobs: - name: Install dependencies run: | uv venv - source .venv/bin/activate uv pip install ".[dev]" - name: Run tests - run: pytest + run: | + source .venv/bin/activate + pytest - name: Check source code format run: black --check --diff . From 6839f64473c135ad5236fd267c30aeb8bc02b89f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:57:17 +0100 Subject: [PATCH 22/58] Use system Python --- .github/workflows/run-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 026e2ef0..230ea067 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,6 +10,9 @@ on: branches: - main +env: + UV_SYSTEM_PYTHON: 1 + jobs: build: runs-on: ${{ matrix.os }} @@ -29,11 +32,9 @@ jobs: sudo apt-get install -y libsndfile1 - name: Install dependencies run: | - uv venv uv pip install ".[dev]" - name: Run tests run: | - source .venv/bin/activate pytest - name: Check source code format run: black --check --diff . From 8155d85d090dd912e33bd18b92c90fb34d205a04 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:14:05 +0100 Subject: [PATCH 23/58] Use setup-python --- .github/workflows/run-tests.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 230ea067..97f1af20 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -22,10 +22,12 @@ jobs: python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 - - name: Setup uv + - name: Install uv uses: astral-sh/setup-uv@v3 - - name: Install Python ${{ matrix.python-version }} - run: uv python install ${{ matrix.python-version }} + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Install libsndfile if: startsWith(matrix.os, 'ubuntu') run: | From f6464257635b6558c01b18f47f040a3043dd58d5 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:17:25 +0100 Subject: [PATCH 24/58] Ping --- .github/workflows/run-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 97f1af20..26db8428 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,6 +1,3 @@ -# Link repository with GitHub Actions -# https://docs.github.com/en/actions/learn-github-actions/introduction-to-github-actions - name: run-tests on: push: From 48367148a56f68f51e1af179f8223b86aee52ca7 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:37:39 +0100 Subject: [PATCH 25/58] Add 3.13 --- .github/workflows/run-tests.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 26db8428..a6d2aca9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,18 +11,16 @@ env: UV_SYSTEM_PYTHON: 1 jobs: - build: + test: runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - - name: Install uv - uses: astral-sh/setup-uv@v3 - - name: Install Python - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v3 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install libsndfile @@ -30,12 +28,10 @@ jobs: run: | sudo apt-get install -y libsndfile1 - name: Install dependencies - run: | - uv pip install ".[dev]" + run: uv pip install ".[dev]" - name: Run tests - run: | - pytest - - name: Check source code format + run: pytest + - name: Check style run: black --check --diff . test-deb10-i386: @@ -54,16 +50,13 @@ jobs: python3-soundfile \ python3-pytest \ git - # 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 + run: pytest-3 build-documentation: runs-on: ubuntu-20.04 From ee22dc43c7910a4f74442d7e1d3064fc7405addc Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:51:17 +0100 Subject: [PATCH 26/58] Split jobs --- .github/workflows/docs.yml | 23 +++++++++++++++++++ .github/workflows/{run-tests.yml => test.yml} | 18 +++------------ 2 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/docs.yml rename .github/workflows/{run-tests.yml => test.yml} (82%) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..e47e6625 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,23 @@ +name: Build docs + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + 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 \ No newline at end of file diff --git a/.github/workflows/run-tests.yml b/.github/workflows/test.yml similarity index 82% rename from .github/workflows/run-tests.yml rename to .github/workflows/test.yml index a6d2aca9..8fc24140 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,5 @@ -name: run-tests +name: Test + on: push: branches: @@ -12,11 +13,11 @@ env: jobs: test: - runs-on: ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v3 @@ -57,16 +58,3 @@ jobs: - 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 From bf1917c2a296f2971fb98fc30d7ca36f0efd20d3 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:03:34 +0100 Subject: [PATCH 27/58] Rename --- .github/workflows/docs.yml | 6 +++--- .github/workflows/test.yml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e47e6625..3dcbd965 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Build docs +name: Build on: push: @@ -9,7 +9,7 @@ on: - main jobs: - build-documentation: + docs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3 @@ -20,4 +20,4 @@ jobs: - name: Build documentation run: | cd docs - make html \ No newline at end of file + make html diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8fc24140..585ab5a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,7 @@ env: jobs: test: + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with {{ matrix.numpy }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] @@ -36,6 +37,7 @@ jobs: run: black --check --diff . test-deb10-i386: + name: Python 3.9 on Debian 10 i386 runs-on: ubuntu-latest container: i386/debian:10 steps: @@ -51,6 +53,7 @@ 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. From ed082570363db6ccd3269f090bac1dfb0074c2e4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:04:31 +0100 Subject: [PATCH 28/58] Remove numpy matrix --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 585ab5a3..601ac7ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with {{ matrix.numpy }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] From 9be66c13ba144758afc2900488c68c562d9ebedc Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:05:14 +0100 Subject: [PATCH 29/58] Fix name for Debian test --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 601ac7ec..6a8d8fc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: run: black --check --diff . test-deb10-i386: - name: Python 3.9 on Debian 10 i386 + name: Python 3.7 on Debian 10 i386 runs-on: ubuntu-latest container: i386/debian:10 steps: From 9b5c046e95f89a8c466a7397c7dfe712e453ea22 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:08:12 +0100 Subject: [PATCH 30/58] Downgrade pandas --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 14080e5c..5e99c301 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", "scipy >= 1.13.0", - "pandas >= 2.2.0", + "pandas >= 2.1.0", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", "requests >= 2.8.1", From eb7f250bac40dadf38215980376a1f5f9fcb8ff9 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:12:53 +0100 Subject: [PATCH 31/58] Revert pandas --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5e99c301..f550ebd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ requires-python = ">= 3.9" dependencies = [ "numpy >= 1.26.4", "scipy >= 1.13.0", - "pandas >= 2.1.0", + "pandas >= 2.2.3", "soundfile >= 0.10.0", "matplotlib >= 3.2.2", "requests >= 2.8.1", From 392d420720f2ea95e8e2b85d4c2e9470721df21f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:15:44 +0100 Subject: [PATCH 32/58] Numpy matrix --- .github/workflows/test.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a8d8fc3..4d7bd204 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,11 +13,21 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with {{ matrix.numpy }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + numpy: ["numpy"] + include: + - python-version: "3.9" + numpy: "numpy==1.26.4" + - python-version: "3.10" + numpy: "numpy==1.26.4" + - python-version: "3.11" + numpy: "numpy==1.26.4" + - python-version: "3.12" + numpy: "numpy==1.26.4" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -30,7 +40,9 @@ jobs: run: | sudo apt-get install -y libsndfile1 - name: Install dependencies - run: uv pip install ".[dev]" + run: | + uv pip install ".[dev]" + uv pip install ${{ matrix.numpy }} - name: Run tests run: pytest - name: Check style From 9d09a00d9b04879d08e5e2583989d3f6e5f350bc Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:17:26 +0100 Subject: [PATCH 33/58] Fix matrix --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d7bd204..241bc06f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,13 @@ jobs: numpy: ["numpy"] include: - python-version: "3.9" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 - python-version: "3.10" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 - python-version: "3.11" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 - python-version: "3.12" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 From 8e90adb29533c00d6aba57e3a241dfaacc8c1dd4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:20:16 +0100 Subject: [PATCH 34/58] Temporarily remove Debian --- .github/workflows/test.yml | 58 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 241bc06f..af294b22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,13 @@ jobs: numpy: ["numpy"] include: - python-version: "3.9" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" - python-version: "3.10" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" - python-version: "3.11" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" - python-version: "3.12" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -48,28 +48,28 @@ jobs: - name: Check style run: black --check --diff . - test-deb10-i386: - name: Python 3.7 on Debian 10 i386 - runs-on: ubuntu-latest - container: i386/debian:10 - steps: - - name: Install dependencies - run: | - apt-get update - apt-get install -y --no-install-recommends \ - python3-matplotlib \ - python3-numpy \ - python3-pandas \ - python3-requests \ - python3-scipy \ - 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 + # test-deb10-i386: + # name: Python 3.7 on Debian 10 i386 + # runs-on: ubuntu-latest + # container: i386/debian:10 + # steps: + # - name: Install dependencies + # run: | + # apt-get update + # apt-get install -y --no-install-recommends \ + # python3-matplotlib \ + # python3-numpy \ + # python3-pandas \ + # python3-requests \ + # python3-scipy \ + # 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 From 31e8463f5290ccbcaf8b40ee6489dbb5fa27ea26 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:27:03 +0100 Subject: [PATCH 35/58] Re-enable --- .github/workflows/test.yml | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af294b22..4d7bd204 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,28 +48,28 @@ jobs: - name: Check style run: black --check --diff . - # test-deb10-i386: - # name: Python 3.7 on Debian 10 i386 - # runs-on: ubuntu-latest - # container: i386/debian:10 - # steps: - # - name: Install dependencies - # run: | - # apt-get update - # apt-get install -y --no-install-recommends \ - # python3-matplotlib \ - # python3-numpy \ - # python3-pandas \ - # python3-requests \ - # python3-scipy \ - # 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 + test-deb10-i386: + name: Python 3.7 on Debian 10 i386 + runs-on: ubuntu-latest + container: i386/debian:10 + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y --no-install-recommends \ + python3-matplotlib \ + python3-numpy \ + python3-pandas \ + python3-requests \ + python3-scipy \ + 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 From 3acea3087def00df2eead392706925756bfb0f19 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:28:54 +0100 Subject: [PATCH 36/58] Test single OS --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d7bd204..c98cfa5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with {{ matrix.numpy }} strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] + #os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] numpy: ["numpy"] include: @@ -28,7 +28,7 @@ jobs: numpy: "numpy==1.26.4" - python-version: "3.12" numpy: "numpy==1.26.4" - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v3 From cb7b529994a3d67df6e3afe9ce7eb554705bed56 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:29:33 +0100 Subject: [PATCH 37/58] Fix name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c98cfa5e..88350688 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with {{ matrix.numpy }} + name: Python ${{ matrix.python-version }} with {{ matrix.numpy }} strategy: matrix: #os: [windows-latest, ubuntu-latest, macos-latest] From 96c2e3b9fb2ff934260e5fc473439c2108d2c7de Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:30:12 +0100 Subject: [PATCH 38/58] Remove quotes --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88350688..0d0d1cc1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,13 @@ jobs: numpy: ["numpy"] include: - python-version: "3.9" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 - python-version: "3.10" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 - python-version: "3.11" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 - python-version: "3.12" - numpy: "numpy==1.26.4" + numpy: numpy==1.26.4 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 14eaa4424d167a29f3d186c8d22d6ccb738e582d Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:31:36 +0100 Subject: [PATCH 39/58] Forgot $ --- .github/workflows/test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d0d1cc1..316ec9fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} with {{ matrix.numpy }} + name: Python ${{ matrix.python-version }} with ${{ matrix.numpy }} strategy: matrix: #os: [windows-latest, ubuntu-latest, macos-latest] @@ -21,13 +21,13 @@ jobs: numpy: ["numpy"] include: - python-version: "3.9" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" - python-version: "3.10" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" - python-version: "3.11" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" - python-version: "3.12" - numpy: numpy==1.26.4 + numpy: "numpy==1.26.4" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 100aaedc81ebdb74ac68fb508595faa798742b4c Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:32:01 +0100 Subject: [PATCH 40/58] Try single command --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 316ec9fe..f728cee2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,8 +41,7 @@ jobs: sudo apt-get install -y libsndfile1 - name: Install dependencies run: | - uv pip install ".[dev]" - uv pip install ${{ matrix.numpy }} + uv pip install ".[dev]" ${{ matrix.numpy }} - name: Run tests run: pytest - name: Check style From 556a4d30baefe1dabc4ecb28eb6511e5257043c1 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:37:48 +0100 Subject: [PATCH 41/58] Simplify matrix --- .github/workflows/test.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f728cee2..93fc65b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,19 +16,15 @@ jobs: name: Python ${{ matrix.python-version }} with ${{ matrix.numpy }} strategy: matrix: - #os: [windows-latest, ubuntu-latest, macos-latest] + os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - numpy: ["numpy"] - include: - - python-version: "3.9" + numpy: + - "numpy" + - "numpy==1.26.4" + exclude: + - python-version: "3.13" numpy: "numpy==1.26.4" - - python-version: "3.10" - numpy: "numpy==1.26.4" - - python-version: "3.11" - numpy: "numpy==1.26.4" - - python-version: "3.12" - numpy: "numpy==1.26.4" - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v3 From b3a5498123dcb9cc89525b6e2ca8360aceda9314 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:39:31 +0100 Subject: [PATCH 42/58] Add OS name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93fc65b6..79247518 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} with ${{ matrix.numpy }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.numpy }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] From 25b75c19612e98cc03c6c1528a4d29f5dc15c1a4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:41:52 +0100 Subject: [PATCH 43/58] Improve name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79247518..5fb238de 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.numpy }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }}${{ matrix.numpy != 'numpy' ? ' with ' + matrix.numpy : '' }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] From 802fd3abff44eaff1cbea4d9d77b35de33292e4b Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:43:23 +0100 Subject: [PATCH 44/58] Revert --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5fb238de..79247518 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }}${{ matrix.numpy != 'numpy' ? ' with ' + matrix.numpy : '' }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.numpy }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] From 9e8136da0bf4e09e630458bd4a6df31001b70ed2 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:44:03 +0100 Subject: [PATCH 45/58] Try another variant --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79247518..6b9ed977 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.numpy }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }}${{ matrix.numpy != 'numpy' && ' with ' + matrix.numpy || '' }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] From a9c7b7471d9a44df5a09abcf50b0cd2ae04561b4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:44:47 +0100 Subject: [PATCH 46/58] OK forget it --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b9ed977..79247518 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }}${{ matrix.numpy != 'numpy' && ' with ' + matrix.numpy || '' }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.numpy }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] From e2692f2cae356cc62cd6028d0768b647e2a83a89 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:08:57 +0100 Subject: [PATCH 47/58] Only test NumPy 1.26.4 on Python 3.9 --- .github/workflows/test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79247518..5303efcf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,11 +18,9 @@ jobs: matrix: os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - numpy: - - "numpy" - - "numpy==1.26.4" - exclude: - - python-version: "3.13" + numpy: ["numpy"] + include: + - python-version: "3.9" numpy: "numpy==1.26.4" runs-on: ${{ matrix.os }} steps: From c8ba35e0f713c9b178da130098047bde1fcdbd73 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:20:02 +0100 Subject: [PATCH 48/58] Try with condition --- .github/workflows/test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5303efcf..a4147509 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,14 +13,14 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} with ${{ matrix.numpy }} + name: Python ${{ matrix.python-version }} on ${{ matrix.os }} strategy: matrix: os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - numpy: ["numpy"] include: - - python-version: "3.9" + - os: ubuntu-latest + python-version: "3.9" numpy: "numpy==1.26.4" runs-on: ${{ matrix.os }} steps: @@ -35,7 +35,9 @@ jobs: sudo apt-get install -y libsndfile1 - name: Install dependencies run: | - uv pip install ".[dev]" ${{ matrix.numpy }} + uv pip install ".[dev]" + - if: ${{ matrix.numpy }} + run: uv pip install ${{ matrix.numpy }} - name: Run tests run: pytest - name: Check style From ab64860ef9b31b18c3d6920caefd510ab34de0fd Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:24:31 +0100 Subject: [PATCH 49/58] Use weak_and_warn --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a4147509..36b23ec0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ on: env: UV_SYSTEM_PYTHON: 1 + NPY_PROMOTION_STATE: weak_and_warn jobs: test: From ed25100343f1534d93d05d2d680e950c96ba0572 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:35:16 +0100 Subject: [PATCH 50/58] Don't fail fast --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36b23ec0..ce6493c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,8 @@ env: UV_SYSTEM_PYTHON: 1 NPY_PROMOTION_STATE: weak_and_warn +jobs.test.strategy.fail-fast: false + jobs: test: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} From 96a52bb098c7d427947f1f78dfecd526b3460d58 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:37:21 +0100 Subject: [PATCH 51/58] Fix syntax --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce6493c4..48bc2e63 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,12 +12,11 @@ env: UV_SYSTEM_PYTHON: 1 NPY_PROMOTION_STATE: weak_and_warn -jobs.test.strategy.fail-fast: false - jobs: test: name: Python ${{ matrix.python-version }} on ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] From ba4e1ab0264263a58dcc2bca149aa6fa7e344681 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:47:09 +0100 Subject: [PATCH 52/58] Fix invalid escape sequence --- wfdb/processing/peaks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfdb/processing/peaks.py b/wfdb/processing/peaks.py index dd276950..47d7ce48 100644 --- a/wfdb/processing/peaks.py +++ b/wfdb/processing/peaks.py @@ -4,7 +4,7 @@ def find_peaks(sig): - """ + r""" Find hard peaks and soft peaks in a signal, defined as follows: - Hard peak: a peak that is either /\ or \/. From 102e60cf48828a1f6d50f09e515e61540e615bb3 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:55:46 +0100 Subject: [PATCH 53/58] Fix dtype promotion warning --- wfdb/io/convert/edf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index c2d0af47..0e76964f 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -399,7 +399,7 @@ def read_edf( } sig_data = np.empty((sig_len, n_sig)) - temp_sig_data = np.fromfile(edf_file, dtype=np.int16) + temp_sig_data = np.fromfile(edf_file, dtype=np.int64) temp_sig_data = temp_sig_data.reshape((-1, sum(samps_per_block))) temp_all_sigs = np.hsplit(temp_sig_data, np.cumsum(samps_per_block)[:-1]) From 0d2a50509c2bb081ead81d816d972227f6b9c731 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 13:01:41 +0100 Subject: [PATCH 54/58] Try again --- wfdb/io/convert/edf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index 0e76964f..c2d0af47 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -399,7 +399,7 @@ def read_edf( } sig_data = np.empty((sig_len, n_sig)) - temp_sig_data = np.fromfile(edf_file, dtype=np.int64) + temp_sig_data = np.fromfile(edf_file, dtype=np.int16) temp_sig_data = temp_sig_data.reshape((-1, sum(samps_per_block))) temp_all_sigs = np.hsplit(temp_sig_data, np.cumsum(samps_per_block)[:-1]) From 99c7f7b94938fc428c391becd39f3e315ccd750a Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 13:03:09 +0100 Subject: [PATCH 55/58] Maybe better --- wfdb/io/convert/edf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index c2d0af47..1e162bcd 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -399,7 +399,7 @@ def read_edf( } sig_data = np.empty((sig_len, n_sig)) - temp_sig_data = np.fromfile(edf_file, dtype=np.int16) + temp_sig_data = np.fromfile(edf_file, dtype=np.int16).astype("int64") temp_sig_data = temp_sig_data.reshape((-1, sum(samps_per_block))) temp_all_sigs = np.hsplit(temp_sig_data, np.cumsum(samps_per_block)[:-1]) From fd12ec1eac2826da8d33cb1042ebfbf972767228 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 15 Jan 2025 10:03:36 +0100 Subject: [PATCH 56/58] Use uv run again --- .github/workflows/test.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48bc2e63..8655c543 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,6 @@ on: - main env: - UV_SYSTEM_PYTHON: 1 NPY_PROMOTION_STATE: weak_and_warn jobs: @@ -20,6 +19,7 @@ jobs: matrix: os: [windows-latest, ubuntu-latest, macos-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + numpy: ["numpy"] include: - os: ubuntu-latest python-version: "3.9" @@ -28,22 +28,15 @@ jobs: steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v3 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - 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 - - name: Install dependencies - run: | - uv pip install ".[dev]" - - if: ${{ matrix.numpy }} - run: uv pip install ${{ matrix.numpy }} + run: sudo apt-get install -y libsndfile1 - name: Run tests - run: pytest + run: uv run --with ${{ matrix.numpy }} --extra dev pytest - name: Check style - run: black --check --diff . + run: uv run --extra dev black --check --diff . test-deb10-i386: name: Python 3.7 on Debian 10 i386 From 397c09d4dfa84ee6ae6cacc6ab297c84fc8bd286 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 15 Jan 2025 10:10:55 +0100 Subject: [PATCH 57/58] Better name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8655c543..66cb211b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ env: jobs: test: - name: Python ${{ matrix.python-version }} on ${{ matrix.os }} + name: Python ${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.numpy }} strategy: fail-fast: false matrix: From ec5e24f8da965457fe48f711890e1aadde30b775 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Sat, 18 Jan 2025 09:26:27 +0100 Subject: [PATCH 58/58] Revert --- wfdb/io/convert/edf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index 1e162bcd..c2d0af47 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -399,7 +399,7 @@ def read_edf( } sig_data = np.empty((sig_len, n_sig)) - temp_sig_data = np.fromfile(edf_file, dtype=np.int16).astype("int64") + temp_sig_data = np.fromfile(edf_file, dtype=np.int16) temp_sig_data = temp_sig_data.reshape((-1, sum(samps_per_block))) temp_all_sigs = np.hsplit(temp_sig_data, np.cumsum(samps_per_block)[:-1])