Skip to content

fix: copy_group fallback uses zarr.from_array instead of deprecated pydantic-zarr IO - #291

Merged
lorenzocerrone merged 1 commit into
mainfrom
fix/pydantic-zarr-from-zarr-deprecation
Nov 16, 2026
Merged

lorenzocerrone merged 1 commit into
mainfrom
fix/pydantic-zarr-from-zarr-deprecation

Conversation

@lorenzocerrone

Copy link
Copy Markdown
Collaborator

Closes #287, closes #288.

pydantic-zarr 0.11.0 deprecated ArraySpec.from_zarr/to_zarr (removal in 0.12). ngio called both in the zarr-python fallback of copy_group, and the test suite turns warnings into errors, so the weekly pip CI went red on both jobs (80 tests each, all this one warning).

  • The fallback now creates each array with zarr.from_array(..., write_data=False). ngio no longer imports pydantic-zarr, which was never a declared dependency.
  • from_array on zarr 3.1.6 does not carry over the fill value or attributes, so both are passed explicitly.
  • New test test_copy_group_fallback_keeps_array_metadata: copied metadata and data equal the source for zarr v2 and v3 (fill value, attributes, key encoding, no compressor, 0-d, strings, sharding with dimension names).
  • Changelog entry under [Unreleased].

Checked locally: full suite passes in a fresh pip environment with pydantic-zarr 0.11.0 and zarr 3.4.2 (1703 passed, 30 skipped, network tests deselected).

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@lorenzocerrone
lorenzocerrone merged commit 584b617 into main Nov 16, 2026
13 checks passed
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.

[test-bot] pip stable tests are failing [test-bot] pip --pre tests are failing

1 participant