Skip to content

ci: repair CI on the v0.15.x maintenance branch - #869

Open
d-v-b wants to merge 9 commits into
zarr-developers:v0.15.xfrom
d-v-b:ci/repair-0.15.x
Open

d-v-b wants to merge 9 commits into
zarr-developers:v0.15.xfrom
d-v-b:ci/repair-0.15.x

Conversation

@d-v-b

@d-v-b d-v-b commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Repairs CI on the v0.15.x maintenance branch by bringing over the CI fixes from backport-0.15-zstd-fixes without the Zstd changes. The only library change is two # type: ignore codes in numcodecs/zarr3.py.

  • Test collection under pytest 9: wraps the itertools.product(...) arguments to parametrize in tuple() in test_checksum32.py.
  • zarr version: caps zarr to <3.1 in CI, the mypy pre-commit hook, and the docs build, because numcodecs.zarr3 on this line targets the zarr 3.0.x API.
  • macOS Intel runner: replaces macos-13 with macos-15-large in the test and wheel workflows, with the LC_RPATH deduplication step that macOS 15 needs.
  • Read the Docs: moves the build image from the removed ubuntu-20.04 to ubuntu-24.04.
  • Coverage: excludes test files from coverage and adds a test for AsType.evolve_from_array_spec when decode_dtype is unset.

These commits passed CI on backport-0.15-zstd-fixes in June 2026. The agent has not rerun them on this base beyond confirming that the tuple change passes the full suite locally (macOS arm64, Python 3.12, pytest 9), so CI on this PR is the real check.

Branch bookkeeping
  • Base: v0.15.x (3cf8ab1, the v0.15.1 tag).
  • Cherry-picks, in order: 15803df, c436070, 64eade5, 7ae0f4b, dd3c1e3, 02dae08. d33d823 (the Zstd backport) is intentionally excluded.
  • dd3c1e3 also touched numcodecs/tests/test_pyzstd.py, which does not exist on this base; that hunk is dropped.
  • Independent of the companion PR for v0.16.x.

🤖 Generated with Claude Code

mkitti and others added 6 commits October 5, 2026 20:29
pytest 9.1 raises PytestRemovedIn10Warning for non-Collection iterables
passed to parametrize, which becomes an error under filterwarnings=error
and aborts test collection. Wrap in tuple() to match main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 15803df)
The numcodecs.zarr3 module in this branch targets the zarr 3.0.x API.
zarr 3.1+ moved these codecs into zarr itself and changed internal APIs
(e.g. the new dtype system), breaking test_zarr3.py. The previous
`--pre zarr>=3.0.0b2` install resolved to zarr 3.2.1, causing 26
failures on Python 3.12/3.13. Pin the test dependency to a compatible
zarr release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit c436070)
macos-13 runners are stalling. main already moved to macos-15-large
(still an Intel runner, preserving x86 coverage). Update the matrix and
the clang-install conditional to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 64eade5)
The conda-forge compilers inject -Wl,-rpath,$PREFIX/lib three times per
link, producing duplicate LC_RPATH load commands. macOS 15's dyld
rejects duplicate LC_RPATH at load time, so the freshly switched
macos-15-large runners failed every test with an ImportError on dlopen.
macos-14's older dyld tolerated the duplicates.

Add a macOS-only post-build step that uses install_name_tool to remove
the redundant LC_RPATH entries from numcodecs/*.so.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 7ae0f4b)
- .readthedocs.yaml: bump build image to ubuntu-24.04 (ubuntu-20.04 was
  removed by Read the Docs) and cap docs zarr to <3.1, matching the
  0.15.x compatibility range.
- .pre-commit-config.yaml: pin the mypy hook's zarr to >=3.0.0rc1,<3.1 so
  type checking runs against the zarr 3.0 API that numcodecs.zarr3 targets
  (the unpinned hook pulled zarr 3.2, whose ZDType broke mypy).
- zarr3.py: correct two `# type: ignore[arg-type]` to `[call-overload]`
  for np.dtype(astype) under current numpy.
- wheel.yaml: swap the stalled macos-13 intel runner for macos-15-large,
  matching ci.yaml.
- codecov.yml / pyproject.toml: exclude test files from coverage
  (ignore: tests/** and [tool.coverage.run] omit), matching main.
- test_zarr3.py: cover AsType.evolve_from_array_spec when decode_dtype is
  unset, bringing zarr3.py to 100%.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit dd3c1e3)
The previous commit copied main's config verbatim, but this branch differs
from main in two ways that broke CI:

- Tests live at numcodecs/tests/ here (main moved them to top-level tests/),
  so codecov `ignore: tests/**` and coverage `omit = ["tests/*"]` matched
  nothing. Point both at numcodecs/tests so the subprocess/skipped-test lines
  stop counting against the 100% project target.
- Read the Docs strips the quotes around post_install commands, so the `<`
  in 'zarr>=3.0.0b2,<3.1' was parsed as a shell input redirection
  ("cannot open 3.1"). Use 'zarr~=3.0.0' instead, which pins to zarr 3.0.x
  with no shell metacharacters.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 02dae08)
@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (3cf8ab1) to head (922b5e7).

Additional details and impacted files
@@             Coverage Diff              @@
##           v0.15.x      #869      +/-   ##
============================================
+ Coverage    99.74%   100.00%   +0.25%     
============================================
  Files           63        26      -37     
  Lines         2753      1063    -1690     
============================================
- Hits          2746      1063    -1683     
+ Misses           7         0       -7     
Files with missing lines Coverage Δ
numcodecs/zarr3.py 100.00% <100.00%> (+0.49%) ⬆️

... and 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

d-v-b added 3 commits October 5, 2026 20:38
GCC 15 defaults to C23, where bool is a keyword, so it rejects the 'typedef _Bool bool' in the c-blosc version bundled on this branch. Pin the conda-forge compilers to GCC 14 on Linux rather than bumping the bundled library on a maintenance line.

Also drop the clang<17 pin on macos-15-large. It downgraded the compiler to clang 14, which cannot parse the macOS 15 SDK headers (math.h: '_Float16 is not supported on this target').

Assisted-by: ClaudeCode:claude-fable-5.1
The Linux wheels are built in the manylinux2014 image. NumPy 2.3 and later publish only manylinux_2_28 wheels, so pip fell back to building the newest NumPy from source, and NumPy 2.5 refuses the image's GCC ('NumPy requires GCC >= 10.3'), which failed the cp312 build. Setting PIP_ONLY_BINARY=numpy makes pip pick the newest NumPy that has a manylinux2014 wheel, keeping the wheels' platform tag unchanged.

Assisted-by: ClaudeCode:claude-fable-5.1
setup.py on this branch appends -mno-avx2 whenever DISABLE_NUMCODECS_AVX2 is set, regardless of architecture. clang 21 from conda-forge rejects that flag on arm64 ('unsupported option -mno-avx2 for target arm64-apple-darwin'), which failed every macos-14 build. Set the variable only on x86_64 runners.

Assisted-by: ClaudeCode:claude-fable-5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants