Skip to content

feat(zarr-metadata)!: replace scope update with copy(update=...) and add definitions with union - #4598

Merged
d-v-b merged 5 commits into
zarr-developers:mainfrom
d-v-b:claude/ecstatic-lamarr-9bd090
Nov 4, 2026
Merged

d-v-b merged 5 commits into
zarr-developers:mainfrom
d-v-b:claude/ecstatic-lamarr-9bd090

Conversation

@d-v-b

@d-v-b d-v-b commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

changes the API for copying / merging contexts to ensure that consumers know which methods blend fields vs which methods overwrite

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)

d-v-b added 2 commits October 29, 2026 20:08
…add definitions with union

`ZarrV3Context.update(**slots)` and `ZarrV2Context.update(**slots)` read
as a merge, but replace each slot whole, so passing one new definition
silently dropped every default. They become `copy(*, update=None)`,
after pydantic's `model_copy(update=...)`, whose replace-whole meaning
pydantic users already know. Adding definitions is `union`, which keeps
every definition the scope has and refuses a conflicting one; the docs,
docstrings and call sites now use it instead of splicing a slot's
definitions back in.

Fixes #424

Assisted-by: ClaudeCode:claude-opus-5-5
…ts PR

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions github-actions Bot added needs release notes Automatically applied to PRs which haven't added release notes zarr-metadata Specific to the zarr-metadata sub-package labels Nov 4, 2026
@d-v-b d-v-b changed the title Claude/ecstatic lamarr 9bd090 feat(zarr-metadata)!: replace scope update with copy(update=...) and add definitions with union Nov 4, 2026
@read-the-docs-community

read-the-docs-community Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 zarr-metadata | 🛠️ Build #35638537 | 📁 Comparing 0207b6c against latest (630bf36)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

d-v-b added 3 commits November 4, 2026 10:27
…r-9bd090

Main renamed the scopes to *_CONTEXT and fields to declarations, and
added scope update call sites (ZARR_PYTHON_CONTEXT, fixed_length_utf32,
the vlen codecs). Conflicts take main's side, then rewrite each scope
update into union (when it splices a slot's definitions back in) or
copy(update=...), and restore this branch's copy/union docs under the
new names.

Assisted-by: ClaudeCode:claude-opus-5-5
…nd name copy in scope docstrings

Assisted-by: ClaudeCode:claude-opus-5-5
@d-v-b
d-v-b marked this pull request as ready for review November 4, 2026 10:15
@d-v-b
d-v-b merged commit 94dcfd1 into zarr-developers:main Nov 4, 2026
45 checks passed
d-v-b added a commit that referenced this pull request Nov 11, 2026
…the #4598 fragment (#4617)

Replace the ten bugfix fragments of #4574 with three, two of them marked
breaking, and shorten the #4592 fragment to the rename and the names a
user is most likely to have imported. The removed detail stays in the
pull requests.

Rename 427.removal.md to 4598.removal.md: the fragment came in with
#4598 but carried the fork PR's number, so the changelog would have
linked to an unrelated upstream PR.

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

Labels

needs release notes Automatically applied to PRs which haven't added release notes zarr-metadata Specific to the zarr-metadata sub-package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant