design/pydantic models#8
Open
d-v-b wants to merge 17 commits into
Open
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GEO_PROJ, SPATIAL, MULTISCALES, LICENSE, UOM are exported as Final[ConventionName] strings so users can write models[GEO_PROJ] with autocomplete instead of remembering the hyphen in 'geo-proj'. README gains a brief note showing the zarr-python attrs idiom (arr.attrs.put(build_attrs(...)) / parse_attrs(dict(arr.attrs))). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replaces ClassVar[Any] on _MODULE with a generic ConventionModuleProtocol[DataT], so each subclass binds to its convention's TypedDict (GeoProjAttrs, SpatialAttrs, etc.). The base class now declares exactly the surface it depends on (UUID, insert, extract). Removes the cast() calls that the looser typing previously needed in _base.py and the wrapper-key models' insert overrides; the wrapper-key insert overrides keep a typed cast since super().to_attrs() returns dict[str, Any] but the module's insert wants the concrete TypedDict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The README's pydantic section already existed but the rendered docs (docs/index.md, docs/api.md) still described the package as TypedDicts only. Adds a parallel pydantic section to docs/index.md with a runnable example using GEO_PROJ/LICENSE constants and a brief zarr-python interop note. docs/api.md gains an mkdocstrings section pointing at the zarr_cm.pydantic public surface (models + build_attrs/parse_attrs). README's Overview list gains a forward link to the pydantic section so skimmers know the option exists. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The docs/superpowers/ directory holds local-only planning artifacts from the Claude Code superpowers skill (specs, plans). They live under docs/ because that's the skill's default, but they aren't part of the published documentation. Adding them to .gitignore prevents accidental commits, and adding `exclude_docs: superpowers/` to mkdocs.yml stops mkdocs --strict from failing on the files (which it did because their relative source links don't resolve when the docs are rendered as a flat site). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
adds optional pydantic integration