From 1070408b80425f1c83f978e32acf8ac42dc3566b Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 29 Oct 2024 19:27:41 +0000 Subject: [PATCH 1/5] Error on warnings when testing --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index c336c72c..d1026104 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,6 +128,10 @@ norecursedirs = [ ] log_cli_level = "INFO" xfail_strict = true +filterwarnings = [ + "error", +] + [tool.cibuildwheel] environment = { DISABLE_NUMCODECS_AVX2=1 } [tool.cibuildwheel.macos] From 66cfdd2054a051ddbb815549b40d6732a5f65298 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 29 Oct 2024 19:49:09 +0000 Subject: [PATCH 2/5] Ignore Python 3.13 warning --- numcodecs/tests/test_compat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/numcodecs/tests/test_compat.py b/numcodecs/tests/test_compat.py index 64addf6a..399312da 100644 --- a/numcodecs/tests/test_compat.py +++ b/numcodecs/tests/test_compat.py @@ -64,6 +64,7 @@ def test_ensure_bytes_invalid_inputs(): ensure_bytes(e) +@pytest.mark.filterwarnings("ignore:The 'u' type code is deprecated and will be removed in Python 3.16") def test_ensure_contiguous_ndarray_invalid_inputs(): # object array not allowed a = np.array(['Xin chào thế giới'], dtype=object) From 5fe46a45734b2698cd0c8093fe84a8110da6e333 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 5 Nov 2024 10:14:16 +0000 Subject: [PATCH 3/5] Use extra to install zfpy --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ec983f16..129dcfe9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -77,7 +77,7 @@ jobs: shell: "bash -l {0}" run: | conda activate env - python -m pip install "zfpy>=1" "numpy<2" + python -m pip install -v ".[zfpy]" - name: List installed packages shell: "bash -l {0}" From 3b98b3fcc565ed64c93e2bde387c125b90129dd6 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 5 Nov 2024 17:50:57 +0000 Subject: [PATCH 4/5] Filter ragged warning --- numcodecs/tests/test_msgpacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numcodecs/tests/test_msgpacks.py b/numcodecs/tests/test_msgpacks.py index c05cc78d..2022ac97 100644 --- a/numcodecs/tests/test_msgpacks.py +++ b/numcodecs/tests/test_msgpacks.py @@ -54,7 +54,7 @@ def test_backwards_compatibility(): codec = MsgPack() check_backwards_compatibility(codec.codec_id, arrays, [codec]) - +@pytest.mark.filterwarnings("ignore:Creating an ndarray from ragged nested sequences .* is deprecated.*") @pytest.mark.parametrize( ("input_data", "dtype"), [ From 943d669733c44e0f19d024aa00c9e4f4806fbf28 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:50:36 +0000 Subject: [PATCH 5/5] style: pre-commit fixes --- numcodecs/tests/test_compat.py | 4 +++- numcodecs/tests/test_msgpacks.py | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/numcodecs/tests/test_compat.py b/numcodecs/tests/test_compat.py index 399312da..0d5f2d74 100644 --- a/numcodecs/tests/test_compat.py +++ b/numcodecs/tests/test_compat.py @@ -64,7 +64,9 @@ def test_ensure_bytes_invalid_inputs(): ensure_bytes(e) -@pytest.mark.filterwarnings("ignore:The 'u' type code is deprecated and will be removed in Python 3.16") +@pytest.mark.filterwarnings( + "ignore:The 'u' type code is deprecated and will be removed in Python 3.16" +) def test_ensure_contiguous_ndarray_invalid_inputs(): # object array not allowed a = np.array(['Xin chào thế giới'], dtype=object) diff --git a/numcodecs/tests/test_msgpacks.py b/numcodecs/tests/test_msgpacks.py index 2022ac97..4f877845 100644 --- a/numcodecs/tests/test_msgpacks.py +++ b/numcodecs/tests/test_msgpacks.py @@ -54,7 +54,10 @@ def test_backwards_compatibility(): codec = MsgPack() check_backwards_compatibility(codec.codec_id, arrays, [codec]) -@pytest.mark.filterwarnings("ignore:Creating an ndarray from ragged nested sequences .* is deprecated.*") + +@pytest.mark.filterwarnings( + "ignore:Creating an ndarray from ragged nested sequences .* is deprecated.*" +) @pytest.mark.parametrize( ("input_data", "dtype"), [