Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions .github/workflows/ci-i386.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ jobs:
py3-pip
py3-pytest

- name: Install zfp
- name: Install zfp and numcodecs
run: |
uv venv
uv pip install --group dev
PYTHON_INCLUDE=$(uv run python -c 'from sysconfig import get_paths; print(get_paths()["include"])');
PYTHON_LIB=$(uv run python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))');
git clone https://github.com/LLNL/zfp
Expand All @@ -56,19 +57,9 @@ 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"
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
uv pip install ./zfp
uv pip install --no-build-isolation -v .
uv pip install "numcodecs[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
shell: alpine.sh {0}

- name: List installed packages
Expand Down
91 changes: 78 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ concurrency:

jobs:
build:
name: Tests
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -49,12 +50,11 @@ jobs:

- name: Install numcodecs
run: |
export DISABLE_NUMCODECS_AVX2=""
# TODO: Remove this conditional when pcodec supports Python 3.14
if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
else
python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]"
fi

- name: List installed packages
Expand All @@ -70,12 +70,72 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

test-crc32c:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: google-crc32c
extras: "google_crc32c"
- name: crc32c
extras: "crc32c"
- name: no-crc32c
extras: ""

defaults:
run:
shell: bash -el {0}

steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3.2.0
with:
channels: conda-forge
miniforge-version: latest
python-version: "3.13"

- name: Install compilers
run: conda install -y c-compiler cxx-compiler

- name: Install numcodecs
run: |
if [[ -n "${{ matrix.extras }}" ]]; then
python -m pip install -v ".[${{ matrix.extras }},test]"
else
python -m pip install -v ".[test]"
fi

- name: List installed packages
run: python -m pip list

- name: Run checksum tests
run: pytest -v tests/test_checksum32.py

- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

test-zarr:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
zarr-version: ["312", "313", "main"]
include:
- zarr-version: "312"
zarr-pkg: "zarr==3.1.2"
- zarr-version: "313"
zarr-pkg: "zarr==3.1.3"
- zarr-version: "main"
zarr-pkg: "zarr @ git+https://github.com/zarr-developers/zarr-python.git@main"

defaults:
run:
Expand All @@ -88,19 +148,24 @@ jobs:
submodules: recursive
fetch-depth: 0 # required for version resolution

- name: Set up Pixi
uses: prefix-dev/setup-pixi@v0.9.0
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3.2.0
with:
pixi-version: v0.49.0
cache: false
channels: conda-forge
miniforge-version: latest
python-version: "3.13"

- name: Install compilers
run: conda install -y c-compiler cxx-compiler

- name: Install numcodecs and Zarr
run: |
python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
- name: List installed packages
shell: "bash -l {0}"
run: pixi run ls-deps-${{matrix.zarr-version}}
run: python -m pip list

- name: Run tests with Zarr ${{ matrix.zarr-version }}
shell: "bash -l {0}"
run: pixi run test-zarr-${{ matrix.zarr-version }}
- name: Run Zarr integration tests
run: pytest tests/test_zarr3.py tests/test_zarr3_import.py

- uses: codecov/codecov-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
CIBW_TEST_COMMAND: python -c "import numcodecs"
CIBW_BUILD: "cp311-* cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-musllinux_* *win32 *_i686 *_s390x"
# note: CIBW_ENVIRONMENT is now set in pyproject.toml
# note: cibuildwheel config-settings are set in pyproject.toml

steps:
- uses: actions/checkout@v5
Expand Down
14 changes: 3 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ __pycache__/
*.py[cod]
*$py.class

# C extensions
numcodecs/**/*.c
numcodecs/**/*.h
# Shared libraries (legacy, meson builds out-of-source)
*.so

# editor
Expand Down Expand Up @@ -50,8 +48,6 @@ coverage.xml
.hypothesis/
cover/

# Cython annotation files
numcodecs/*.html

# Translations
*.mo
Expand Down Expand Up @@ -99,12 +95,8 @@ ENV/
# PyCharm
.idea

# setuptools-scm
numcodecs/version.py

# Cython generated
numcodecs/*.c
# pixi environments
.pixi/*
*.egg-info
pixi.lock
pixi.lock
uv.lock
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

3 changes: 2 additions & 1 deletion adhoc/blosc_memleak_check.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import sys

import numcodecs
import numpy as np
from numpy.testing import assert_array_equal

import numcodecs

codec = numcodecs.Blosc()
data = np.arange(int(sys.argv[1]))
for _ in range(int(sys.argv[2])):
Expand Down
Loading
Loading