Skip to content

Commit e9c3f9f

Browse files
committed
Merge branch 'main' into pcodec-v1
2 parents 097931e + 1fdde70 commit e9c3f9f

134 files changed

Lines changed: 2876 additions & 2077 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ coverage:
88
default:
99
target: 100
1010
ignore:
11-
- "numcodecs/tests/**"
11+
- "tests/**"
1212
comment:
1313
layout: "diff, files"
1414
behavior: default

.github/workflows/ci-i386.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@ jobs:
4545
py3-pip
4646
py3-pytest
4747
48-
- name: Install zfp
48+
- name: Install zfp and numcodecs
4949
run: |
5050
uv venv
51+
uv pip install --group dev
5152
PYTHON_INCLUDE=$(uv run python -c 'from sysconfig import get_paths; print(get_paths()["include"])');
5253
PYTHON_LIB=$(uv run python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))');
5354
git clone https://github.com/LLNL/zfp
@@ -56,19 +57,9 @@ jobs:
5657
uv run cmake zfp -B zfp/build -DBUILD_ZFPY=ON -DBUILD_TESTING=OFF -DPYTHON_LIBRARY=$PYTHON_LIB -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE
5758
uv run make -j -C zfp/build
5859
uv run sudo make -C zfp/build install
59-
uv add "zfpy @ ./zfp"
60-
shell: alpine.sh {0}
61-
62-
- name: Install numcodecs
63-
run: |
64-
export DISABLE_NUMCODECS_AVX2=""
65-
uv venv
66-
# TODO: Remove this conditional when pcodec supports Python 3.14
67-
if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
68-
uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]
69-
else
70-
uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]
71-
fi
60+
uv pip install ./zfp
61+
uv pip install --no-build-isolation -v .
62+
uv pip install "numcodecs[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
7263
shell: alpine.sh {0}
7364

7465
- name: List installed packages

.github/workflows/ci.yaml

Lines changed: 81 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.11", "3.12", "3.13", "3.14"]
16-
# macos-13 is an intel runner, macos-14 is an arm64 runner
17-
platform: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-13, macos-14]
15+
python-version: ["3.12", "3.13", "3.14"]
16+
# macos-15-large is an intel runner, macos-14 is an arm64 runner
17+
platform: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-15-large, macos-14]
1818

1919
defaults:
2020
run:
@@ -38,7 +38,7 @@ jobs:
3838
run: conda install -y c-compiler cxx-compiler
3939

4040
- name: Install clang
41-
if: matrix.platform == 'macos-13'
41+
if: matrix.platform == 'macos-15-large'
4242
run: conda install -y 'clang>=12.0.1,<17'
4343

4444
- name: Show conda environment info
@@ -49,12 +49,11 @@ jobs:
4949
5050
- name: Install numcodecs
5151
run: |
52-
export DISABLE_NUMCODECS_AVX2=""
5352
# TODO: Remove this conditional when pcodec supports Python 3.14
5453
if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
55-
python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]
54+
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
5655
else
57-
python -m pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]
56+
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]"
5857
fi
5958
6059
- name: List installed packages
@@ -70,12 +69,72 @@ jobs:
7069
token: ${{ secrets.CODECOV_TOKEN }}
7170
verbose: true
7271

72+
test-crc32c:
73+
runs-on: ubuntu-latest
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
include:
78+
- name: google-crc32c
79+
extras: "google_crc32c"
80+
- name: crc32c
81+
extras: "crc32c"
82+
- name: no-crc32c
83+
extras: ""
84+
85+
defaults:
86+
run:
87+
shell: bash -el {0}
88+
89+
steps:
90+
- name: Checkout source
91+
uses: actions/checkout@v5
92+
with:
93+
submodules: recursive
94+
fetch-depth: 0
95+
96+
- name: Set up Conda
97+
uses: conda-incubator/setup-miniconda@v3.2.0
98+
with:
99+
channels: conda-forge
100+
miniforge-version: latest
101+
python-version: "3.13"
102+
103+
- name: Install compilers
104+
run: conda install -y c-compiler cxx-compiler
105+
106+
- name: Install numcodecs
107+
run: |
108+
if [[ -n "${{ matrix.extras }}" ]]; then
109+
python -m pip install -v ".[${{ matrix.extras }},test]"
110+
else
111+
python -m pip install -v ".[test]"
112+
fi
113+
114+
- name: List installed packages
115+
run: python -m pip list
116+
117+
- name: Run checksum tests
118+
run: pytest -v tests/test_checksum32.py
119+
120+
- uses: codecov/codecov-action@v5
121+
with:
122+
fail_ci_if_error: true
123+
token: ${{ secrets.CODECOV_TOKEN }}
124+
verbose: true
125+
73126
test-zarr:
74127
runs-on: ubuntu-latest
75128
strategy:
76129
fail-fast: false
77130
matrix:
78-
zarr-version: ["312", "313", "main"]
131+
include:
132+
- zarr-version: "308"
133+
zarr-pkg: "zarr==3.0.8"
134+
- zarr-version: "316"
135+
zarr-pkg: "zarr==3.1.6"
136+
- zarr-version: "main"
137+
zarr-pkg: "zarr @ git+https://github.com/zarr-developers/zarr-python.git@main"
79138

80139
defaults:
81140
run:
@@ -88,19 +147,24 @@ jobs:
88147
submodules: recursive
89148
fetch-depth: 0 # required for version resolution
90149

91-
- name: Set up Pixi
92-
uses: prefix-dev/setup-pixi@v0.9.0
150+
- name: Set up Conda
151+
uses: conda-incubator/setup-miniconda@v3.2.0
93152
with:
94-
pixi-version: v0.49.0
95-
cache: false
153+
channels: conda-forge
154+
miniforge-version: latest
155+
python-version: "3.13"
156+
157+
- name: Install compilers
158+
run: conda install -y c-compiler cxx-compiler
96159

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

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

105169
- uses: codecov/codecov-action@v5
106170
with:

.github/workflows/wheel.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
# macos-13 is an intel runner, macos-14 is an arm64 runner
23-
os: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-13, macos-14]
22+
# macos-15-large is an intel runner, macos-14 is an arm64 runner
23+
os: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-15-large, macos-14]
2424
env:
2525
CIBW_TEST_COMMAND: python -c "import numcodecs"
26-
CIBW_BUILD: "cp311-* cp312-* cp313-* cp314-*"
26+
CIBW_BUILD: "cp312-* cp313-* cp314-*"
2727
CIBW_SKIP: "*-musllinux_* *win32 *_i686 *_s390x"
28-
# note: CIBW_ENVIRONMENT is now set in pyproject.toml
28+
# note: cibuildwheel config-settings are set in pyproject.toml
2929

3030
steps:
3131
- uses: actions/checkout@v5
@@ -52,7 +52,7 @@ jobs:
5252
- uses: actions/setup-python@v5
5353
name: Install Python
5454
with:
55-
python-version: "3.11"
55+
python-version: "3.12"
5656

5757
- name: Build sdist
5858
run: pipx run build --sdist

.gitignore

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ __pycache__/
33
*.py[cod]
44
*$py.class
55

6-
# C extensions
7-
numcodecs/**/*.c
8-
numcodecs/**/*.h
6+
# Shared libraries (legacy, meson builds out-of-source)
97
*.so
108

119
# editor
@@ -50,8 +48,6 @@ coverage.xml
5048
.hypothesis/
5149
cover/
5250

53-
# Cython annotation files
54-
numcodecs/*.html
5551

5652
# Translations
5753
*.mo
@@ -99,12 +95,8 @@ ENV/
9995
# PyCharm
10096
.idea
10197

102-
# setuptools-scm
103-
numcodecs/version.py
104-
105-
# Cython generated
106-
numcodecs/*.c
10798
# pixi environments
10899
.pixi/*
109100
*.egg-info
110-
pixi.lock
101+
pixi.lock
102+
uv.lock

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ submodules:
44
include: all
55

66
build:
7-
os: ubuntu-20.04
7+
os: ubuntu-24.04
88
tools:
99
python: "3.12"
1010
jobs:

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Numcodecs
2+
3+
Numcodecs is a Python package providing buffer compression and transformation
4+
codecs for use in data storage and communication applications.
5+
6+
[![Docs](https://readthedocs.org/projects/numcodecs/badge/?version=latest)](https://numcodecs.readthedocs.io/en/latest/?badge=latest)
7+
[![Tests](https://github.com/zarr-developers/numcodecs/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/zarr-developers/numcodecs/actions/workflows/ci.yaml)
8+
[![Wheels](https://github.com/zarr-developers/numcodecs/actions/workflows/wheel.yaml/badge.svg?branch=main)](https://github.com/zarr-developers/numcodecs/actions/workflows/wheel.yaml)
9+
[![Codecov](https://codecov.io/gh/zarr-developers/numcodecs/branch/main/graph/badge.svg)](https://codecov.io/gh/zarr-developers/numcodecs)

adhoc/blosc_memleak_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import sys
22

3-
import numcodecs
43
import numpy as np
54
from numpy.testing import assert_array_equal
65

6+
import numcodecs
7+
78
codec = numcodecs.Blosc()
89
data = np.arange(int(sys.argv[1]))
910
for _ in range(int(sys.argv[2])):
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
Codec API
2-
=========
1+
# Codec API
2+
3+
```{eval-rst}
34
.. automodule:: numcodecs.abc
45
56
.. autoclass:: Codec
@@ -9,3 +10,4 @@ Codec API
910
.. automethod:: decode
1011
.. automethod:: get_config
1112
.. automethod:: from_config
13+
```

0 commit comments

Comments
 (0)