diff --git a/.github/codecov.yml b/.github/codecov.yml index e9b99c821..9b2c0d7ea 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -2,7 +2,10 @@ coverage: status: project: default: - target: 100 + # Compare against the base commit instead of requiring 100%: on this + # maintenance branch the zarr and crc32c fallback paths are not + # covered by the jobs that upload coverage. + target: auto threshold: 0.1 patch: default: diff --git a/.github/workflows/ci-i386.yml b/.github/workflows/ci-i386.yml index 61f46b7c7..4f63cfa9f 100644 --- a/.github/workflows/ci-i386.yml +++ b/.github/workflows/ci-i386.yml @@ -56,19 +56,15 @@ jobs: uv run cmake zfp -B zfp/build -DBUILD_ZFPY=ON -DBUILD_TESTING=OFF -DPYTHON_LIBRARY=$PYTHON_LIB -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE uv run make -j -C zfp/build uv run sudo make -C zfp/build install - uv add "zfpy @ ./zfp" + uv pip install ./zfp shell: alpine.sh {0} - name: Install numcodecs run: | export DISABLE_NUMCODECS_AVX2="" - uv venv - # TODO: Remove this conditional when pcodec supports Python 3.14 - if [[ "${{ matrix.python-version }}" == "3.14" ]]; then - uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy] - else - uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy] - fi + # pcodec is left out: it has no i386 wheel, and its source build + # produces a wheel tagged x86_64 that cannot be installed here. + uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy] shell: alpine.sh {0} - name: List installed packages @@ -76,5 +72,5 @@ jobs: shell: alpine.sh {0} - name: Run tests - run: uv run pytest -v + run: uv run --no-sync pytest -v shell: alpine.sh {0} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2c6a53507..3747a29a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,8 +13,8 @@ jobs: fail-fast: false matrix: python-version: ["3.11", "3.12", "3.13", "3.14"] - # macos-13 is an intel runner, macos-14 is an arm64 runner - platform: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-13, macos-14] + # macos-15-large is an intel runner, macos-14 is an arm64 runner + platform: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-15-large, macos-14] defaults: run: @@ -37,10 +37,6 @@ jobs: - name: Install compilers run: conda install -y c-compiler cxx-compiler - - name: Install clang - if: matrix.platform == 'macos-13' - run: conda install -y 'clang>=12.0.1,<17' - - name: Show conda environment info run: | conda info @@ -57,6 +53,22 @@ jobs: python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy] fi + - name: Deduplicate LC_RPATH entries + # The conda-forge compilers inject -Wl,-rpath,$PREFIX/lib multiple + # times, producing duplicate LC_RPATH load commands. macOS 15's dyld + # rejects duplicate LC_RPATH at load time, so strip the extras. + if: runner.os == 'macOS' + run: | + rpaths() { otool -l "$1" | awk '/ LC_RPATH$/{getline; getline; print $2}'; } + for so in numcodecs/*.so; do + for rp in $(rpaths "$so" | sort | uniq -d); do + while [ "$(rpaths "$so" | grep -cx "$rp")" -gt 1 ]; do + echo "Removing duplicate LC_RPATH '$rp' from $so" + install_name_tool -delete_rpath "$rp" "$so" + done + done + done + - name: List installed packages run: python -m pip list @@ -75,7 +87,7 @@ jobs: strategy: fail-fast: false matrix: - zarr-version: ["312", "313", "main"] + zarr-version: ["312", "313"] defaults: run: diff --git a/.github/workflows/wheel.yaml b/.github/workflows/wheel.yaml index 466b90185..a006d513d 100644 --- a/.github/workflows/wheel.yaml +++ b/.github/workflows/wheel.yaml @@ -19,8 +19,8 @@ jobs: strategy: fail-fast: false matrix: - # macos-13 is an intel runner, macos-14 is an arm64 runner - os: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-13, macos-14] + # macos-15-large is an intel runner, macos-14 is an arm64 runner + os: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-15-large, macos-14] env: CIBW_TEST_COMMAND: python -c "import numcodecs" CIBW_BUILD: "cp311-* cp312-* cp313-* cp314-*" diff --git a/.readthedocs.yaml b/.readthedocs.yaml index fa14bf340..44e973358 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -4,7 +4,7 @@ submodules: include: all build: - os: ubuntu-20.04 + os: ubuntu-24.04 tools: python: "3.12" jobs: diff --git a/numcodecs/tests/test_checksum32.py b/numcodecs/tests/test_checksum32.py index 06b0a1a8c..cbdd80293 100644 --- a/numcodecs/tests/test_checksum32.py +++ b/numcodecs/tests/test_checksum32.py @@ -63,12 +63,12 @@ def get_all_codecs(): return codecs -@pytest.mark.parametrize(("codec", "arr"), itertools.product(get_all_codecs(), arrays)) +@pytest.mark.parametrize(("codec", "arr"), tuple(itertools.product(get_all_codecs(), arrays))) def test_encode_decode(codec, arr): check_encode_decode(arr, codec) -@pytest.mark.parametrize(("codec", "arr"), itertools.product(get_all_codecs(), arrays)) +@pytest.mark.parametrize(("codec", "arr"), tuple(itertools.product(get_all_codecs(), arrays))) def test_errors(codec, arr): enc = codec.encode(arr) with pytest.raises(RuntimeError): diff --git a/numcodecs/tests/test_pyzstd.py b/numcodecs/tests/test_pyzstd.py index 7ee6084b4..4474f5805 100644 --- a/numcodecs/tests/test_pyzstd.py +++ b/numcodecs/tests/test_pyzstd.py @@ -2,9 +2,10 @@ import numpy as np import pytest -import pyzstd -from numcodecs.zstd import Zstd +pyzstd = pytest.importorskip("pyzstd") + +from numcodecs.zstd import Zstd # noqa: E402 test_data = [ b"Hello World!", diff --git a/pyproject.toml b/pyproject.toml index db2f3b618..f49e2d33d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,12 +92,6 @@ test-zarr-313 = [ "zarr==3.1.3", "crc32c", ] -test-zarr-main = [ - "pytest", - "pytest-cov", - "zarr @ git+https://github.com/zarr-developers/zarr-python.git@main", - "crc32c", -] [tool.setuptools] package-dir = {"" = "."} @@ -250,7 +244,6 @@ conflicts = [ [ { group = "test-zarr-312" }, { group = "test-zarr-313" }, - { group = "test-zarr-main" } ] ] @@ -283,10 +276,8 @@ test-google-crc32c = ["test", "test-google-crc32c"] [tool.pixi.tasks] ls-deps-312 = "uv run --group test-zarr-312 uv pip freeze" ls-deps-313 = "uv run --group test-zarr-313 uv pip freeze" -ls-deps-main = "uv run --group test-zarr-main uv pip freeze" test-zarr-312 = "uv run --group test-zarr-312 pytest numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" test-zarr-313 = "uv run --group test-zarr-313 pytest numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" -test-zarr-main = "uv run --group test-zarr-main pytest numcodecs/tests/test_zarr3.py numcodecs/tests/test_zarr3_import.py" [tool.pixi.feature.test.tasks] run-tests = "pytest -v"