Skip to content
Open
5 changes: 4 additions & 1 deletion .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/ci-i386.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,21 @@ 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
run: uv pip list
shell: alpine.sh {0}

- name: Run tests
run: uv run pytest -v
run: uv run --no-sync pytest -v
shell: alpine.sh {0}
26 changes: 19 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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

Expand All @@ -75,7 +87,7 @@ jobs:
strategy:
fail-fast: false
matrix:
zarr-version: ["312", "313", "main"]
zarr-version: ["312", "313"]

defaults:
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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-*"
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ submodules:
include: all

build:
os: ubuntu-20.04
os: ubuntu-24.04
tools:
python: "3.12"
jobs:
Expand Down
4 changes: 2 additions & 2 deletions numcodecs/tests/test_checksum32.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 3 additions & 2 deletions numcodecs/tests/test_pyzstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!",
Expand Down
9 changes: 0 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {"" = "."}
Expand Down Expand Up @@ -250,7 +244,6 @@ conflicts = [
[
{ group = "test-zarr-312" },
{ group = "test-zarr-313" },
{ group = "test-zarr-main" }
]
]

Expand Down Expand Up @@ -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"
Loading