Repository navigation
test(codecs): check numcodecs filters encode to their declared shape - #4591
Merged
d-v-b merged 2 commits intoNov 2, 2026
Merged
Conversation
Replace the PackBits round-trip test, which passed with or without the zarr-developersgh-4553 fix, with one parametrized test asserting that every numcodecs filter's encoded chunk has the shape `resolve_metadata` declares. It covers the 2-element PackBits chunk, where the packed length equals the chunk size. Rewrite the 4560 changelog fragment without private names. Assisted-by: ClaudeCode:claude-opus-5-5
d-v-b
marked this pull request as ready for review
November 2, 2026 08:47
Contributor
Author
|
self-merging because this is a minor improvement to test coverage with no user-facing impact |
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.
This PR contains minor follow-ups to #4560 that expand the space of tests to more carefully check the bug fixed in that PR
[x] I'm a meat-based entity
🤖 AI text below 🤖
This PR replaces a PackBits round-trip test added in #4560, which passed with or without that PR's fix, with one parametrized test asserting that each numcodecs filter's encoded chunk has the shape
resolve_metadatadeclares. It also rewrites the #4560 changelog fragment so it describes the user-visible change without naming private methods.Details
test_generic_filter_encoded_shapecalls_encode_syncdirectly forDelta,FixedScaleOffset,Quantize,BitRound,AsTypeandPackBits, and compares the output shape withcodec.resolve_metadata(spec).shape.(1, 2)bool chunk forPackBits: the packed length,1 + ceil(2 / 8) == 2, equals the chunk size. An earlier revision of fix(codecs): reshape flattened numcodecs filter output on encode #4560 that guessed from sizes reshaped that output to(1, 2)instead of the declared(2,).delta,fixedscaleoffset) and on fix(codecs): reshape flattened numcodecs filter output on encode #4560's first revision (packbits-2), and passes on currentmain.tests/test_codecs/passes (881 tests).changes/4560.bugfix.md.🤖 Generated with Claude Code