Repository navigation
Conversation
- Parse the installed zfpy version with packaging.version, so that post-releases such as zfpy 1.0.1.post0 no longer make `import numcodecs` raise ValueError (zarr-developersgh-892). Unparseable versions disable the ZFPY codec instead of breaking the import. `packaging` becomes a runtime dependency, and the zfpy extra now requires zfpy>=1.0.1, matching the version gate. - Replace the retired macos-14 runner with macos-15 and macos-15-large with macos-15-intel in the Tests and Wheels workflows, following zarr-developersgh-878. - Pin the i386 job to ubuntu-24.04: setup-alpine relies on `sudo -E`, which the sudo-rs in the Ubuntu 26.04 ubuntu-latest image ignores. Assisted-by: ClaudeCode:claude-opus-5.5
Replace jirutka/setup-alpine with `docker run --platform linux/386 alpine:3.24` on ubuntu-latest. The action runs `sudo -E`, which the sudo-rs in Ubuntu 26.04 ignores, so pinning ubuntu-24.04 only lasted until that image is retired. An x86_64 kernel runs i386 binaries natively, so the container needs no emulation, no sudo and no third-party action. The build steps move into .github/scripts/test-i386.sh, which also runs locally. Assisted-by: ClaudeCode:claude-opus-5.5
Forks have no CODECOV_TOKEN, so every Tests job on a fork failed at the Codecov upload step even when pytest passed. Set fail_ci_if_error only when github.repository is zarr-developers/numcodecs, which also holds for pull requests opened against upstream from forks. Assisted-by: ClaudeCode:claude-opus-5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
import numcodecsno longer fails when a zfpy post-release such as 1.0.1.post0 is installed. CI now runs on macos-15 and macos-15-intel in place of the retired macos-14 runner, and the i386 tests run in a 32-bit Alpine Docker container instead of throughjirutka/setup-alpine.What was failing and why
The agent found three causes of failure. Together they turn every PR red, as well as the scheduled Wheels run on
main.src/numcodecs/zfpy.pycalledint()on each version component, so"post0"raisedValueError, andnumcodecs/__init__.pyonly suppressesImportError. This breaks the tests on every platform that installs zfpy. It also causes the Read the Docs failure (docs/conf.pyimports numcodecs) and the codecov/project failure.ci.yamlandwheel.yamlfails or is cancelled. Open PR ci: macOS 14 runner image is closing down zarr-developers/numcodecs#878 only updateswheel.yaml.ubuntu-latestnow points to Ubuntu 26.04, which shipssudo-rs.jirutka/setup-alpinerunssudo -E,sudo-rsignores-E, and the action dies withINPUT_APK_TOOLS_URL: unbound variable(Incompatibility withsudoof the Ubuntu 26.04 image of GitHub-hosted runners jirutka/setup-alpine#39). The workaround suggested there, pinningubuntu-24.04, only lasts until that image is retired, so this PR drops the action instead.Changes
src/numcodecs/zfpy.py: adds_zfpy_version_supported(), which parses the installed version withpackaging.version.Versionand compares it to 1.0.1. An unparseable version returnsFalse, so the ZFPY codec is disabled with a warning instead ofimport numcodecscrashing. The old NumPy version probe is dropped, becausenumpy>=2.0is already a hard dependency, so "zfpy >= 1.0.1" was the only real condition.pyproject.toml: addspackagingto the runtime dependencies. It is pure Python and is already pulled in by pytest, setuptools-scm and others. Thezfpyextra now requireszfpy>=1.0.1, to match the gate..github/workflows/ci.yamlandwheel.yaml:macos-14→macos-15(arm64), andmacos-15-large→macos-15-intel(the standard Intel label), as in ci: macOS 14 runner image is closing down zarr-developers/numcodecs#878, applied to both workflows..github/workflows/ci-i386.ymland new.github/scripts/test-i386.sh: the job runsdocker run --platform linux/386 alpine:3.24 sh .github/scripts/test-i386.shonubuntu-latest. An x86_64 kernel runs i386 binaries natively, so this needs no emulation, no sudo and no third-party action. The script keeps the old build steps: the same apk packages, a uv venv, zfpy built from LLNL/zfp source, then numcodecs and pytest. It also runs locally with the samedocker runcommand..github/workflows/ci.yaml: the three Codecov upload steps now usefail_ci_if_error: ${{ github.repository == 'zarr-developers/numcodecs' }}. Forks have noCODECOV_TOKEN, so on the agent's fork every job failed at the upload step even though pytest passed. On upstream, including PRs from forks (wheregithub.repositoryis the base repository), upload errors still fail the job.tests/test_zfpy_version.py: one parametrized test of_zfpy_version_supportedcovering release, post-release (the Importing numcodecs fails with zfpy 1.0.1.post0 installed zarr-developers/numcodecs#892 case), pre-release, local, dev, too-old and unparseable versions. It is a separate file becausetest_zfpy.pyskips the whole module when zfpy is not importable, and this test does not need zfpy.docs/release.md: Maintenance and Fixes entries.Relation to zarr-developersgh-893 and zarr-developersgh-878
This PR supersedes both and builds on their approach. Credit goes to the authors of zarr-developers#893 (
packaging.versionparsing and the new dependency) and zarr-developers#878 (the macos-15 / macos-15-intel runner labels). Differences:runpyunder a monkeypatchedimportlib.metadata.version. It also handles unparseable versions and bumps thezfpyextra floor.ci.yaml, not justwheel.yaml.Verification
The agent ran these checks locally on macOS arm64 with CPython 3.13, numpy 2.5.5, zfpy 1.0.1.post0 and pcodec 1.1.0:
ValueError: invalid literal for int() with base 10: 'post0'with zfpy 1.0.1.post0 installed.import numcodecssucceeds, andget_codec({'id': 'zfpy'})returns a ZFPY codec.pytest: 871 passed, 22 skipped (cupy).pre-commit run --all-filespassed withSKIP=mypy; the mypy hook can't build zfpy for the free-threaded interpreter pre-commit picks locally. mypy 1.16.0 was run separately in the 3.13 venv oversrcandtests: no issues.--platform linux/386gives an i686 Alpine 3.24 environment). The agent did not run the full build there, because on an arm64 host it runs under emulation; the fork's x86_64 CI run is the real check for that job.🤖 Generated with Claude Code