From 45a832c4ff08f531475a60c8b6a6a4c08d083c4f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:30:20 +0200 Subject: [PATCH 01/56] 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 53047e22dee04e498976fedff8529c6cbb515355 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:49:15 +0200 Subject: [PATCH 02/56] 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 3105f32a65600138e33dfd9e4dc9114f36d6c269 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:51:08 +0200 Subject: [PATCH 03/56] 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 6bd08fb0a7804d77a29828f1e5a0c29f4b6ab530 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 23 Oct 2024 09:53:11 +0200 Subject: [PATCH 04/56] 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 f1f1ab932da7bbed91bd3806b61ac59215597f71 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Fri, 25 Oct 2024 10:23:34 +0200 Subject: [PATCH 05/56] 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 3445bef8d350201a3f3042f6f4331a9dfba7adb9 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:31:09 +0100 Subject: [PATCH 06/56] 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 e2ff829aa4c9fc65cc9da335d7c2959b5c890bf2 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:34:18 +0100 Subject: [PATCH 07/56] 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 4b3e4c6dbbc352d53b2a5db2e6d96d8713939e4c Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:36:02 +0100 Subject: [PATCH 08/56] 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 7cffcda9a8f4226e5a8a8ecdbed6042b4a9e5dcb Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:38:57 +0100 Subject: [PATCH 09/56] 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 7dd56174fa95ee76a8676a20aec84633f4223983 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:41:36 +0100 Subject: [PATCH 10/56] 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 52dd99b9cb504415933c866040081ec6340263da Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:45:52 +0100 Subject: [PATCH 11/56] 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 1f3bacd8fd817a52d907438a2b38415753012cd4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 13:50:34 +0100 Subject: [PATCH 12/56] 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 7fb608e664acf223140da2b28832efc47fc34ba0 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Mon, 18 Nov 2024 15:42:42 +0100 Subject: [PATCH 13/56] 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 b2ffd5179ddbfb57455a5b0e8c179ed409aae5a1 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 08:05:37 +0100 Subject: [PATCH 14/56] 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 2349a410ac15197a02f868cd24b88d4d5ea29ce9 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 08:57:09 +0100 Subject: [PATCH 15/56] 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 7c3daabce49cf89e738baa260978c17b0be6e65c Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 09:12:24 +0100 Subject: [PATCH 16/56] 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 efcc57486c51c1b65c7adfff292f75477f49e75c Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 09:20:42 +0100 Subject: [PATCH 17/56] 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 a9366ecf30617609626b086a87a940f934d38ec6 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 19 Nov 2024 10:45:33 +0100 Subject: [PATCH 18/56] 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 0556a678ed55d63a422d9125db0acd2679bdaff3 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:42:10 +0100 Subject: [PATCH 19/56] 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 9825b4a2a56b3090611d58086ca4f1e374c86847 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:45:11 +0100 Subject: [PATCH 20/56] 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 c1a4dae94bfc315183136b8ed00bd14f3203b9c1 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:46:53 +0100 Subject: [PATCH 21/56] 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 e0ade6a599c2263784ad361cf22f324a58d9b0fb Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 09:57:17 +0100 Subject: [PATCH 22/56] 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 37df1e7713fe59ccf29ca262ebe389d63694f1ab Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:14:05 +0100 Subject: [PATCH 23/56] 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 18edd50d99dead87b98a3b6b386ebb650a0ff02a Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:17:25 +0100 Subject: [PATCH 24/56] 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 4e81718b86d734fa496d71a2776f84ccc5ff12e0 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:37:39 +0100 Subject: [PATCH 25/56] 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 16071e4c74218edcbde0c18055feb6546f583501 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 10:51:17 +0100 Subject: [PATCH 26/56] 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 dfdd451a6b78d64735f5b31a9c9cfc7dea953281 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:03:34 +0100 Subject: [PATCH 27/56] 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 510e45faa59a8769916a04d80606e59ac9e00c47 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:04:31 +0100 Subject: [PATCH 28/56] 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 a7e7ed7f8474b3df2425503330f7470d53a9b721 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:05:14 +0100 Subject: [PATCH 29/56] 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 3f43fd2ec8c6b36161b948feb67c0a12825e7b3f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:08:12 +0100 Subject: [PATCH 30/56] 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 2ea3f8fc7cb8a52ea25babded26d6ce3e6b7a25c Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:12:53 +0100 Subject: [PATCH 31/56] 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 fc91a13c82fa5e77880687c596127bd08a26d490 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:15:44 +0100 Subject: [PATCH 32/56] 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 c773875c044983a35236f57e4a35e6caf11abec3 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:17:26 +0100 Subject: [PATCH 33/56] 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 fb7120ea85dd10131d951def087e414e2ce37878 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:20:16 +0100 Subject: [PATCH 34/56] 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 6fd6bc0bd609dca0c28037d55951fe808025187f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:27:03 +0100 Subject: [PATCH 35/56] 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 8357620c9214c3b3f34a75fb700abf2409c3517a Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:28:54 +0100 Subject: [PATCH 36/56] 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 386a462b32863292c2846cd5b6c63e13e4fee99e Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:29:33 +0100 Subject: [PATCH 37/56] 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 d6df0ce9aa323a1dd79606382a228d35e8fe34bd Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:30:12 +0100 Subject: [PATCH 38/56] 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 ae8ebe46e0acb644f4679be7822cad0e8e96353f Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:31:36 +0100 Subject: [PATCH 39/56] 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 fb5d6ada20f043cbf680e178a6bb3cc5b288ed45 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:32:01 +0100 Subject: [PATCH 40/56] 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 39f3a987dd02543675cd603e1f5091d203f96a17 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:37:48 +0100 Subject: [PATCH 41/56] 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 9e234ea769ac045038047da376c2a08d334319c9 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:39:31 +0100 Subject: [PATCH 42/56] 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 781690d2a4663040d3ddc4a5466cffd266082b41 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:41:52 +0100 Subject: [PATCH 43/56] 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 f804e789fa89052760d75b2cc5964a5315de7962 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:43:23 +0100 Subject: [PATCH 44/56] 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 1f91640b57f1843f97e5755a6aebaea0f63e1a3a Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:44:03 +0100 Subject: [PATCH 45/56] 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 fc4db5013dcde63dd41c107884c6e90726d9e4b5 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 11:44:47 +0100 Subject: [PATCH 46/56] 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 9ee80270f36d0b3edabc78758b4f53295594d025 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:08:57 +0100 Subject: [PATCH 47/56] 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 e82bfac97b5f2ec52e4d073df5298fbb42e12028 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:20:02 +0100 Subject: [PATCH 48/56] 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 ad26811b639b60f697831d1a3cd8b62828254d5d Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:24:31 +0100 Subject: [PATCH 49/56] 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 2387ca3ed3b661de777035826e86a86404b17ad2 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:35:16 +0100 Subject: [PATCH 50/56] 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 537cc7a1f0f8fdd8ab6ebb5613f9266b426ad13d Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:37:21 +0100 Subject: [PATCH 51/56] 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 235f215232851139390d66671c1f34e7c27988cc Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:47:09 +0100 Subject: [PATCH 52/56] 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 68d5c04d5ebb2b5415d87bd647de6e29a38aeca7 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 12:55:46 +0100 Subject: [PATCH 53/56] 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 e3096884..ef8142b2 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]) for i in range(n_sig): From afbf5420301e9ad63efc09b4a5742469eab34ef9 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 13:01:41 +0100 Subject: [PATCH 54/56] Try again --- wfdb/io/convert/edf.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index ef8142b2..ef5ea947 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -399,25 +399,27 @@ 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]) for i in range(n_sig): # Check if `samps_per_frame` has all equal values if samps_per_frame.count(samps_per_frame[0]) == len(samps_per_frame): sig_data[:, i] = ( - temp_all_sigs[i].flatten() - baseline[i] + temp_all_sigs[i].flatten().astype("int64") - baseline[i] ) / adc_gain_all[i] else: temp_sig_data = temp_all_sigs[i].flatten() if samps_per_frame[i] == 1: - sig_data[:, i] = (temp_sig_data - baseline[i]) / adc_gain_all[i] + sig_data[:, i] = ( + temp_sig_data.astype("int64") - baseline[i] + ) / adc_gain_all[i] else: for j in range(sig_len): start_ind = j * samps_per_frame[i] stop_ind = start_ind + samps_per_frame[i] sig_data[j, i] = np.mean( - (temp_sig_data[start_ind:stop_ind] - baseline[i]) + (temp_sig_data[start_ind:stop_ind].astype("int64") - baseline[i]) / adc_gain_all[i] ) From 1a437e65f5a2f509180bfae1fe9d266ad6523509 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 13:03:09 +0100 Subject: [PATCH 55/56] Maybe better --- wfdb/io/convert/edf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index ef5ea947..27bd5669 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -399,27 +399,27 @@ 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]) for i in range(n_sig): # Check if `samps_per_frame` has all equal values if samps_per_frame.count(samps_per_frame[0]) == len(samps_per_frame): sig_data[:, i] = ( - temp_all_sigs[i].flatten().astype("int64") - baseline[i] + temp_all_sigs[i].flatten() - baseline[i] ) / adc_gain_all[i] else: temp_sig_data = temp_all_sigs[i].flatten() if samps_per_frame[i] == 1: sig_data[:, i] = ( - temp_sig_data.astype("int64") - baseline[i] + temp_sig_data - baseline[i] ) / adc_gain_all[i] else: for j in range(sig_len): start_ind = j * samps_per_frame[i] stop_ind = start_ind + samps_per_frame[i] sig_data[j, i] = np.mean( - (temp_sig_data[start_ind:stop_ind].astype("int64") - baseline[i]) + (temp_sig_data[start_ind:stop_ind] - baseline[i]) / adc_gain_all[i] ) From 0269bf7614c712480f7e59da753a276ba5720351 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 26 Nov 2024 13:08:42 +0100 Subject: [PATCH 56/56] Fix style --- wfdb/io/convert/edf.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wfdb/io/convert/edf.py b/wfdb/io/convert/edf.py index 27bd5669..32a3b193 100644 --- a/wfdb/io/convert/edf.py +++ b/wfdb/io/convert/edf.py @@ -411,9 +411,7 @@ def read_edf( else: temp_sig_data = temp_all_sigs[i].flatten() if samps_per_frame[i] == 1: - sig_data[:, i] = ( - temp_sig_data - baseline[i] - ) / adc_gain_all[i] + sig_data[:, i] = (temp_sig_data - baseline[i]) / adc_gain_all[i] else: for j in range(sig_len): start_ind = j * samps_per_frame[i]