Skip to content

docs: clarify Zarr v3 codec pipeline roles - #4166

Open
mgalore wants to merge 7 commits into
zarr-developers:mainfrom
mgalore:docs/issue-4159-array-bytes-codec
Open

mgalore wants to merge 7 commits into
zarr-developers:mainfrom
mgalore:docs/issue-4159-array-bytes-codec

Conversation

@mgalore

@mgalore mgalore commented Jul 20, 2026 •

Copy link
Copy Markdown

Summary

Clarifies how the Zarr v3 codec pipeline maps to filters, serializer, and compressors, resolving the ambiguity that led ArrayBytes codecs such as imagecodecs JPEG-XL to be supplied as compressors. Adds an executable BytesCodec serializer example, updates the relevant API references, and includes a documentation news fragment.

Closes #4159

For reviewers

The change is documentation and docstring-only. The main point to check is that the descriptions accurately distinguish ArrayArray, ArrayBytes, and BytesBytes codec roles and that the explicit serializer example reflects the API.

Author attestation

  • I am a human, these are my changes, and I have reviewed and understood every change and can explain why each is correct.

TODO

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

Validation

  • pytest -q tests/test_docs.py::test_no_unvalidated_blocks tests/test_docs.py::test_test_only_blocks_come_last tests/test_docs.py::test_documentation_examples[user-guide/arrays.md:arrays] (3 passed)
  • mkdocs build --strict started successfully but was terminated by the local runner (exit 137) during the complete site build; the targeted executable documentation test above passed.
  • markdownlint-cli2 --files docs/user-guide/arrays.md
  • towncrier check --compare-with HEAD
  • git diff --check

@codecov

codecov Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.71%. Comparing base (43dfe32) to head (131d60c).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4166   +/-   ##
=======================================
  Coverage   94.71%   94.71%           
=======================================
  Files          94       94           
  Lines       13659    13659           
=======================================
  Hits        12937    12937           
  Misses        722      722           
Files with missing lines Coverage Δ
src/zarr/api/asynchronous.py 96.46% <ø> (ø)
src/zarr/api/synchronous.py 95.77% <ø> (ø)
src/zarr/core/array.py 98.43% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mgalore
mgalore force-pushed the docs/issue-4159-array-bytes-codec branch from 91778d4 to a5f91c4 Compare September 4, 2026 17:07
Revert RST-style double backticks to single backticks in the edited docstrings, replace references to the removed array.v3_default_compressors / array.v3_default_serializer config keys with the actual Zarr format 3 defaults, and rename the changelog fragment after the PR number.

Assisted-by: ClaudeCode:claude-opus-5-5
@read-the-docs-community

Copy link
Copy Markdown

@read-the-docs-community

Copy link
Copy Markdown

d-v-b added 2 commits October 9, 2026 18:32
State that these names are not defined in the Zarr format 3
specification, and map each one to the spec's codec kind
(array -> array, array -> bytes, bytes -> bytes) with links to the
spec's chunk encoding section and `codecs` metadata field.

Assisted-by: ClaudeCode:claude-opus-5-5
@d-v-b

d-v-b commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

I pushed some clarification (e.g., that "filters", "serializer", "compressor" are zarr-pythonisms that the spec does not define). thanks @mgalore

@d-v-b d-v-b added this to the 3.4.2 milestone Oct 9, 2026
@d-v-b
d-v-b enabled auto-merge (squash) October 9, 2026 16:35

This branch has not been deployed

No deployments
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.

DOC: Unclear how to use Zarr3 ArrayBytesCodec

2 participants