Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
b1b5f22
fix(zarr-metadata): extension points are written as objects, which ev…
d-v-b Sep 28, 2026
f21439c
fix(zarr-metadata): problems show the JSON they found, and the bounda…
d-v-b Sep 28, 2026
f3bfd68
feat(zarr-metadata): read_array_metadata_v3 returns what it read besi…
d-v-b Sep 28, 2026
4ba6bee
refactor(zarr-metadata)!: a field reads as Read, Unclaimed or Refused…
d-v-b Sep 28, 2026
94271ef
feat(zarr-metadata): a zarr.json is read as the node its node_type sa…
d-v-b Sep 28, 2026
2f7672b
feat(zarr-metadata)!: a bound is its member's type, and a problem car…
d-v-b Sep 28, 2026
fd999e0
feat(zarr-metadata): with_problems groups a read's problems by field,…
d-v-b Sep 29, 2026
ee02435
fix(zarr-metadata)!: a regular grid's chunk lengths are at least 1, a…
d-v-b Sep 29, 2026
887f460
feat(zarr-metadata): JSON Schemas of a TypedDict, a field in a scope,…
d-v-b Sep 29, 2026
d667398
feat(zarr-metadata)!: a model checks itself when it is built, and to_…
d-v-b Sep 29, 2026
e7b934e
fix(zarr-metadata): a member a closed object does not declare is an u…
d-v-b Sep 29, 2026
3b96e78
fix(zarr-metadata): a zarr.json of no node type says what format it i…
d-v-b Sep 29, 2026
8d77352
fix(zarr-metadata): consolidated metadata is judged as the hierarchy …
d-v-b Sep 29, 2026
f5753be
fix(zarr-metadata): two models are equal when they mean the same docu…
d-v-b Sep 29, 2026
c2e5638
fix(zarr-metadata): fix the problems found by the adversarial review …
d-v-b Sep 29, 2026
c7a38a6
fix(zarr-metadata): report a value past JSON_DEPTH as too deep withou…
d-v-b Oct 5, 2026
b55cafb
refactor(zarr-metadata): remove the RecursionError fallback for non-J…
d-v-b Oct 5, 2026
96f17e3
fix(zarr-metadata): fix review findings on the reader stack
d-v-b Oct 5, 2026
0222674
docs(zarr-metadata): rewrite the 382 changelog fragments in plain Eng…
d-v-b Oct 6, 2026
635508d
feat(zarr-metadata): add a separate read that repairs known writer bugs
d-v-b Oct 6, 2026
0158308
docs(zarr-metadata): add a changelog fragment for the repair read
d-v-b Oct 6, 2026
9e0bb82
docs(zarr-metadata): rewrite the 391 changelog fragments in plain Eng…
d-v-b Oct 6, 2026
9bf5211
feat(zarr-metadata): make Context compare and hash by its definitions
d-v-b Oct 6, 2026
5df3047
feat(zarr-metadata): add the Claims type, Conflict, and ScopeConflict…
d-v-b Oct 6, 2026
0f16749
feat(zarr-metadata): add claims_of, which lists what a reading claime…
d-v-b Oct 6, 2026
8723c6e
feat(zarr-metadata): add refines, an information order on two reading…
d-v-b Oct 6, 2026
989367c
feat(zarr-metadata): add Context.disagreements and Context.joined
d-v-b Oct 6, 2026
4d85e80
docs(zarr-metadata): document the scope operations
d-v-b Oct 6, 2026
990ad76
fix(zarr-metadata): compare a gain in refines the way Unclaimed compares
d-v-b Oct 6, 2026
c93da50
docs(zarr-metadata): rename the scope fragment with its PR number
d-v-b Oct 6, 2026
de78ec1
docs(zarr-metadata): rewrite the 392 changelog fragments in plain Eng…
d-v-b Oct 6, 2026
10ae208
feat(zarr-metadata)!: make ZarrV3ArrayMetadata a (document, context) …
d-v-b Oct 6, 2026
21ce3f8
feat(zarr-metadata): cache the array model's equality key and pickle …
d-v-b Oct 6, 2026
8464b1f
feat(zarr-metadata): add update, with_context, refined_in and refines…
d-v-b Oct 6, 2026
a0de8a4
feat(zarr-metadata)!: make ZarrV3GroupMetadata and ZarrV3Consolidated…
d-v-b Oct 6, 2026
0613866
refactor(zarr-metadata)!: remove the held-field machinery
d-v-b Oct 6, 2026
13c3b5c
test(zarr-metadata): migrate tests to document construction and update
d-v-b Oct 6, 2026
f9ebea3
docs(zarr-metadata): describe the (document, context) model
d-v-b Oct 6, 2026
581f2ab
fix(zarr-metadata): fix refines on nested fields, scope of nested mod…
d-v-b Oct 6, 2026
7dd1815
fix(zarr-metadata): freeze model views at every level; build nested m…
d-v-b Oct 6, 2026
d3853d5
fix(zarr-metadata): make reading.consolidated read-only; recurse into…
d-v-b Oct 6, 2026
fa32f89
fix(zarr-metadata): restore pickling of group readings; recurse into …
d-v-b Oct 6, 2026
c84a647
fix(zarr-metadata): pickle a reading through its model
d-v-b Oct 6, 2026
baa96f0
docs(zarr-metadata): rename the document-context fragments with their…
d-v-b Oct 6, 2026
6acbe60
docs(zarr-metadata): rewrite the 393 changelog fragments in plain Eng…
d-v-b Oct 6, 2026
01001bc
feat(zarr-metadata): accept context=None for the default scope in eve…
d-v-b Oct 6, 2026
f3f14da
feat(zarr-metadata): accept node models as consolidated-metadata entries
d-v-b Oct 6, 2026
513f698
chore(zarr-metadata): run pyright unpinned
d-v-b Oct 6, 2026
db5e3d1
docs(zarr-metadata): document model entries in consolidated metadata …
d-v-b Oct 6, 2026
bfe5c64
fix(zarr-metadata): replace models nested inside listed documents; fi…
d-v-b Oct 6, 2026
f076ff3
fix(zarr-metadata): check depth for adopted model entries; re-read re…
d-v-b Oct 6, 2026
ddfeba7
fix(zarr-metadata): make ZarrV3NodeMetadataInput a runtime type; repo…
d-v-b Oct 6, 2026
c54522c
docs(zarr-metadata): rename the consolidating-models fragments with t…
d-v-b Oct 6, 2026
6f1a366
docs(zarr-metadata): rewrite the 395 changelog fragments in plain Eng…
d-v-b Oct 6, 2026
7db6383
refactor(zarr-metadata): a kind is the class that declares is_kind
d-v-b Oct 6, 2026
13b1ffb
refactor(zarr-metadata): let each kind say how its format writes a field
d-v-b Oct 6, 2026
0359b40
refactor(zarr-metadata): move the fill value members to a WithFillVal…
d-v-b Oct 6, 2026
9d73abf
feat(zarr-metadata): add the v2 data type and codec kinds
d-v-b Oct 6, 2026
f7c116c
feat(zarr-metadata): define the v2 data types
d-v-b Oct 6, 2026
49c9a9f
feat(zarr-metadata): define the v2 codecs numcodecs 0.16 writes
d-v-b Oct 6, 2026
79eb196
feat(zarr-metadata): add CORE_V2 and the v2 field readers
d-v-b Oct 6, 2026
9b8cde3
feat(zarr-metadata): read v2 dtype, codecs and fill value in CORE_V2
d-v-b Oct 6, 2026
4ac25eb
fix(zarr-metadata): accept what zarr-python 2.x writes that review ro…
d-v-b Oct 6, 2026
59b86d7
fix(zarr-metadata): keep a zero fill value where the v2 family takes …
d-v-b Oct 6, 2026
ef75bda
fix(zarr-metadata): refuse a v2 typestr that writes no size
d-v-b Oct 8, 2026
ec08ff6
docs(zarr-metadata): name the v2 scopes fragment after its PR
d-v-b Oct 8, 2026
a2ba363
feat(zarr-metadata): read a v2 array document once, in a scope
d-v-b Oct 8, 2026
5c75667
feat(zarr-metadata)!: make the v2 array model a pair of document and …
d-v-b Oct 8, 2026
fd8873b
feat(zarr-metadata)!: make the v2 group model a pair of document and …
d-v-b Oct 8, 2026
042aaa6
feat(zarr-metadata)!: make v2 consolidated metadata a pair that holds…
d-v-b Oct 8, 2026
d904570
feat(zarr-metadata)!: v2 pydantic field types read in a scope; remove…
d-v-b Oct 8, 2026
e207cd8
fix(zarr-metadata): repair the member zarr-python 3.x writes into .zg…
d-v-b Oct 8, 2026
874a46d
fix(zarr-metadata): read every consolidated node beside a doubled key…
d-v-b Oct 8, 2026
e022f4a
fix(zarr-metadata): a repeated slash inside a consolidated node path …
d-v-b Oct 8, 2026
7900385
docs(zarr-metadata): name the v2 models fragments after their PR
d-v-b Oct 8, 2026
8d7b4ac
Merge remote-tracking branch 'upstream/main' into feat/zarr-metadata-…
d-v-b Oct 8, 2026
4430716
refactor(zarr-metadata)!: export less; say why the core has no valida…
d-v-b Oct 8, 2026
05cf275
refactor(zarr-metadata): narrow JSON containers with type guards, not…
d-v-b Oct 8, 2026
9bf67b5
refactor(zarr-metadata): type the alias registry and the model's held…
d-v-b Oct 8, 2026
59282c5
refactor(zarr-metadata): models compute their own keys on a shared Ke…
d-v-b Oct 8, 2026
3b69760
refactor(zarr-metadata): check what a read established instead of cas…
d-v-b Oct 8, 2026
3c20c0f
docs(zarr-metadata): consolidate the stack's changelog fragments unde…
d-v-b Oct 8, 2026
97fe5a4
docs(zarr-metadata): one changelog fragment for the whole PR
d-v-b Oct 8, 2026
8e17e82
Merge branch 'main' into feat/zarr-metadata-document-context-stack
d-v-b Oct 8, 2026
f1f7300
Merge branch 'main' into feat/zarr-metadata-document-context-stack
d-v-b Oct 8, 2026
fb6a18d
refactor(zarr-metadata): declare a kind with the class keyword kind=True
d-v-b Oct 8, 2026
ae25974
refactor(zarr-metadata)!: name a read field by what it is: AcceptedFi…
d-v-b Oct 8, 2026
bc4eced
refactor(zarr-metadata): rename Definition.judge to read_configuratio…
d-v-b Oct 9, 2026
3c4be60
feat(zarr-metadata)!: a scope is of one Zarr format, and a reader ref…
d-v-b Oct 9, 2026
06260dc
fix(zarr-metadata): a field's configuration, nested fields and a stag…
d-v-b Oct 9, 2026
16c0b5b
fix(zarr-metadata): a gain is judged by what the definition reads, so…
d-v-b Oct 9, 2026
d5436ea
fix(zarr-metadata): a listed group's own listing holds the documents …
d-v-b Oct 9, 2026
1a3ddc2
fix(zarr-metadata): an integer JSON text cannot hold, and a v2 float …
d-v-b Oct 9, 2026
0cb22c1
fix(zarr-metadata): ScopeConflictError pickles and copies with its co…
d-v-b Oct 9, 2026
54a4723
fix(zarr-metadata): a v2 float fill value overflows at its dtype's wi…
d-v-b Oct 9, 2026
f6007db
docs(zarr-metadata): models are pairs, not dataclasses; 3.1 wrote nul…
d-v-b Oct 9, 2026
a6664db
fix(zarr-metadata): the cleanups a review found: messages, guards, v2…
d-v-b Oct 9, 2026
e36af64
docs(zarr-metadata): the fragment names the judge and check removals
d-v-b Oct 12, 2026
31e3e72
refactor(zarr-metadata)!: name the v3 field aliases, the unknown-node…
d-v-b Oct 13, 2026
76d77a4
ci(zarr-metadata): mkdocstrings 1.0.7 for pymdown-extensions 12.2; a …
d-v-b Oct 13, 2026
c414f94
Merge remote-tracking branch 'upstream/main' into feat/zarr-metadata-…
d-v-b Oct 13, 2026
21ca973
perf(zarr-metadata): read a document in one refine walk, with lazy mo…
d-v-b Oct 18, 2026
c777c9b
docs(zarr-metadata): the fragment for the faster read
d-v-b Oct 18, 2026
5285877
docs(zarr-metadata): the faster-read fragment is #4490's, which it la…
d-v-b Oct 22, 2026
3c2a9aa
Merge remote-tracking branch 'upstream/main' into claude/zarr-metadat…
d-v-b Oct 22, 2026
20d6b0b
fix(zarr-metadata): what two reviews of the faster read found
d-v-b Oct 22, 2026
4ea7ea4
docs(zarr-metadata): add a draft parsing and validation guide
d-v-b Oct 23, 2026
093cd8e
docs(zarr-metadata): complete the parsing and validation guide
d-v-b Oct 23, 2026
18c48e7
docs(zarr-metadata): rewrite docstrings and comments in plain English
d-v-b Oct 23, 2026
c64e659
docs(zarr-metadata): correct docstrings that disagree with the code
d-v-b Oct 23, 2026
d03f09b
fix(zarr-metadata): keep an omitted v2 dimension_separator omitted
d-v-b Oct 23, 2026
bd8c2f2
refactor(zarr-metadata): ask the kind about restricted field aliases
d-v-b Oct 23, 2026
086d48a
refactor(zarr-metadata)!: move the reading machinery both formats sha…
d-v-b Oct 23, 2026
916648c
refactor(zarr-metadata): move the NumPy fill value encodings both for…
d-v-b Oct 23, 2026
68535dc
refactor(zarr-metadata): split the model modules by Zarr format
d-v-b Oct 23, 2026
d437ad5
docs(zarr-metadata): describe the models as document and scope pairs
d-v-b Oct 23, 2026
99eb3a1
refactor(zarr-metadata)!: give JSON Schema output one home, zarr_meta…
d-v-b Oct 23, 2026
711012e
refactor(zarr-metadata)!: give each codec and data type name one publ…
d-v-b Oct 23, 2026
ec7189d
refactor(zarr-metadata)!: export each public name from exactly one mo…
d-v-b Oct 23, 2026
90aac6d
docs(zarr-metadata): drop the nav entry for the uncommitted scope page
d-v-b Oct 23, 2026
79044fd
docs(zarr-metadata): rebuild the package README from the docs home page
d-v-b Oct 23, 2026
418ec09
refactor(zarr-metadata)!: give the problem types a home at the bottom…
d-v-b Oct 23, 2026
26e95c9
fix(zarr-metadata): stop checking v2 node paths with the v3 naming rules
d-v-b Oct 23, 2026
7cc76c4
fix(zarr-metadata): make the pydantic and package JSON Schemas accept…
d-v-b Oct 23, 2026
52af0d2
refactor(zarr-metadata)!: put the v2 dtype type and the numpy time un…
d-v-b Oct 23, 2026
4a7e200
docs(zarr-metadata): document the top-level namespace and why the v3 …
d-v-b Oct 23, 2026
6ef5791
test(zarr-metadata): import public names from their public homes
d-v-b Oct 23, 2026
e05a451
docs(zarr-metadata): name only public API in the unreleased changelog…
d-v-b Oct 23, 2026
845c1b7
refactor(zarr-metadata): tidy the v2 dtype helpers, the crc32c config…
d-v-b Oct 23, 2026
f76ac5b
fix(zarr-metadata)!: refuse a v2 scope in the v3 field schema, and de…
d-v-b Oct 23, 2026
c29c14c
docs(zarr-metadata): make the release notes describe changes since 0.5.0
d-v-b Oct 23, 2026
4b31110
docs(zarr-metadata): correct the release notes on v2 extra members an…
d-v-b Oct 23, 2026
dc3767d
docs(zarr-metadata): say that model members are now fields, and fix t…
d-v-b Oct 23, 2026
036b464
docs(zarr-metadata): add the changes since 0.5.0 that the release not…
d-v-b Oct 23, 2026
5ef1904
docs(zarr-metadata): say how to check strict JSON now that the JSON h…
d-v-b Oct 23, 2026
81d9800
feat(zarr-metadata): make create_default take the members update take…
d-v-b Oct 23, 2026
534f502
feat(zarr-metadata): add the v2 group reader and the v2 node reader
d-v-b Oct 23, 2026
f3da375
refactor(zarr-metadata)!: remove resolve_dtype_v2 and resolve_codec_v2
d-v-b Oct 23, 2026
a4bb9ea
refactor(zarr-metadata): call every Context instance `context`
d-v-b Oct 24, 2026
f1555c1
feat(zarr-metadata): add read_consolidated_metadata_v2, which returns…
d-v-b Oct 24, 2026
4028d41
fix(zarr-metadata): read a v2 node from its decoded files, not from s…
d-v-b Oct 24, 2026
eab0bcf
feat(zarr-metadata)!: read a v3 group without reading its consolidate…
d-v-b Oct 24, 2026
647b33f
feat(zarr-metadata): export every definition and scope from zarr_meta…
d-v-b Oct 24, 2026
670bda3
refactor(zarr-metadata): make Context.definitions a property
d-v-b Oct 24, 2026
0538082
refactor(zarr-metadata)!: give each format's scope one slot per kind …
d-v-b Oct 24, 2026
3b83c90
feat(zarr-metadata)!: read members a v3 document does not define as e…
d-v-b Oct 24, 2026
98594c1
refactor(zarr-metadata): store a scope as one table per slot
d-v-b Oct 24, 2026
5b7876d
refactor(zarr-metadata)!: make Context a protocol, and the scope of e…
d-v-b Oct 24, 2026
1363259
refactor(zarr-metadata): declare a scope's slots once, in a closed Ty…
d-v-b Oct 24, 2026
0d67e2a
refactor(zarr-metadata): hold a scope's definitions as tables by kind…
d-v-b Oct 24, 2026
bd790fd
refactor(zarr-metadata): remove casts and Any that the type checker d…
d-v-b Oct 24, 2026
99ce3af
fix(zarr-metadata): compare unclaimed extra fields as written, and re…
d-v-b Oct 24, 2026
01eee14
fix(zarr-metadata)!: take extension members in extra_fields, and chec…
d-v-b Oct 24, 2026
dc46aa2
fix(zarr-metadata): refuse a kind of the other format in a scope's lo…
d-v-b Oct 24, 2026
243b6e0
feat(zarr-metadata): export configuration_of, and correct the docs re…
d-v-b Oct 24, 2026
3d193b3
fix(zarr-metadata): name what a scope argument was given, and return …
d-v-b Oct 24, 2026
2ff0b13
fix(zarr-metadata): small fixes that review found in listings, confli…
d-v-b Oct 24, 2026
24e2954
docs(zarr-metadata): renumber two changelog fragments
d-v-b Oct 24, 2026
dc67ee7
fix(zarr-metadata): count a U struct field in code points of four bytes
d-v-b Oct 24, 2026
40b5352
feat(zarr-metadata): repair a bare non-finite fill value in a v2 .zarray
d-v-b Oct 24, 2026
e2d9f0d
fix(zarr-metadata): accept the v2 codec configurations numcodecs writes
d-v-b Oct 24, 2026
a9df644
fix(zarr-metadata): compare v2 codecs with numcodecs defaults filled in
d-v-b Oct 24, 2026
6a5531e
fix(zarr-metadata): accept a v2 struct dtype with no fields
d-v-b Oct 24, 2026
88b23bb
fix(zarr-metadata): locate consolidated v2 fields at the document's o…
d-v-b Oct 24, 2026
31af753
fix(zarr-metadata): keep a v2 reading's filters UNSET when they are n…
d-v-b Oct 24, 2026
df41c14
fix(zarr-metadata): report attributes in a v2 node file alike in ever…
d-v-b Oct 24, 2026
39405fb
fix(zarr-metadata): refuse a v3 scope before a v2 store reader decode…
d-v-b Oct 24, 2026
1beaed8
docs(zarr-metadata): describe the v2 fixes as changes since 0.5.0
d-v-b Oct 24, 2026
23bcc58
fix(zarr-metadata): write a v2 .zmetadata's top-level keys in their o…
d-v-b Oct 24, 2026
8e2934a
fix(zarr-metadata): make ZarrV2NodeMetadata a type alias at run time
d-v-b Oct 24, 2026
42f9b30
fix(zarr-metadata): name the whole union when a value is outside its …
d-v-b Oct 24, 2026
15f63f9
docs(zarr-metadata): document the v2 guards' tuples and unitless time…
d-v-b Oct 24, 2026
1cd814f
docs(zarr-metadata): correct what the v2 blosc docstring says of bloc…
d-v-b Oct 24, 2026
8332800
docs(zarr-metadata): number the changelog fragments without gaps, and…
d-v-b Oct 24, 2026
5b16868
fix(zarr-metadata): what the second review round found in definitions…
d-v-b Oct 24, 2026
6c83235
fix(zarr-metadata): repair bare non-finite fills in v3 listings, and …
d-v-b Oct 24, 2026
66d4bd0
fix(zarr-metadata): accept a unitless time type in a v2 codec's dtype…
d-v-b Oct 24, 2026
9b7671e
fix(zarr-metadata): compare v2 codec parameters that numcodecs reads …
d-v-b Oct 24, 2026
19b766a
fix(zarr-metadata): bound v2 lz4 acceleration and shuffle elementsize…
d-v-b Oct 24, 2026
93432d6
fix(zarr-metadata): report every problem of a v2 node file that holds…
d-v-b Oct 24, 2026
e914334
docs(zarr-metadata): document v2 codec dtype parameters and the write…
d-v-b Oct 24, 2026
52f9aa8
docs(zarr-metadata): list the v3 repair of bare non-finite fill value…
d-v-b Oct 24, 2026
4192179
fix(zarr-metadata): keep v2 codec parameters that numcodecs encodes w…
d-v-b Oct 24, 2026
35c7d0f
fix(zarr-metadata): what the third review round found in update, waiv…
d-v-b Oct 24, 2026
986336b
fix(zarr-metadata): what the fourth review round found in waivers, un…
d-v-b Oct 24, 2026
07bd9e8
fix(zarr-metadata): keep false and 0 apart in a union's expected valu…
d-v-b Oct 24, 2026
cadab38
fix(zarr-metadata): name the definition and member when a waiver's al…
d-v-b Oct 24, 2026
450eac9
feat(zarr-metadata): add unclaimed_fields, group.consolidated() and p…
d-v-b Oct 24, 2026
e126134
refactor(zarr-metadata)!: name each v2 definition by its kind
d-v-b Oct 24, 2026
cf4c744
feat(zarr-metadata): give the v2 array and group models a node_type
d-v-b Oct 24, 2026
223f108
refactor(zarr-metadata)!: make v2 attributes an empty mapping when th…
d-v-b Oct 24, 2026
df3a848
refactor(zarr-metadata)!: key v2 consolidated metadata by node path, …
d-v-b Oct 24, 2026
38e29ec
refactor(zarr-metadata)!: give the repaired v2 consolidated reading t…
d-v-b Oct 24, 2026
aa6a164
refactor(zarr-metadata)!: remove the document validate, is and parse …
d-v-b Oct 24, 2026
d216986
refactor(zarr-metadata)!: remove the JSONPartial TypedDicts
d-v-b Oct 24, 2026
b3306ad
refactor(zarr-metadata): make the definition hooks private
d-v-b Oct 24, 2026
8391baa
docs(zarr-metadata): number the new changelog fragments, and stop nam…
d-v-b Oct 24, 2026
ef062b8
refactor(zarr-metadata): keep the definition hooks private without a …
d-v-b Oct 24, 2026
f7b2a00
fix(zarr-metadata): compare a v2 node with no .zattrs equal to one wi…
d-v-b Oct 24, 2026
171dd57
fix(zarr-metadata): what the review of the API batch found in pydanti…
d-v-b Oct 24, 2026
524abef
fix(zarr-metadata): narrow a union of node models on node_type, and i…
d-v-b Oct 24, 2026
b647496
fix(zarr-metadata): report what sits at a conflict's location, and sa…
d-v-b Oct 24, 2026
7b04152
feat(zarr-metadata)!: replace a scope's slots with update, and take a…
d-v-b Oct 25, 2026
6e198d0
refactor(zarr-metadata)!: combine scopes with union, and keep disagre…
d-v-b Oct 25, 2026
81bed41
fix(zarr-metadata): fill a missing crc32c location with end, as numco…
d-v-b Oct 25, 2026
d1e5165
fix(zarr-metadata): check the scope before decoding bytes in v3 from_…
d-v-b Oct 25, 2026
4c630ad
fix(zarr-metadata): make the node aliases hold their unions at run time
d-v-b Oct 25, 2026
553c8bc
fix(zarr-metadata): check the format of a kind before resolve reads t…
d-v-b Oct 25, 2026
a914fd1
perf(zarr-metadata): copy a model's document only when pydantic repor…
d-v-b Oct 25, 2026
f5e18f3
refactor(zarr-metadata): remove duplicated key sets and repair code
d-v-b Oct 25, 2026
bb30a54
refactor(zarr-metadata): tell an unread constraint apart by its type,…
d-v-b Oct 25, 2026
f423531
docs(zarr-metadata): say that the v3 field schema check only narrows …
d-v-b Oct 25, 2026
311a54b
test(zarr-metadata): cover extra fields, update errors and unclaimed …
d-v-b Oct 25, 2026
2f3c374
test(zarr-metadata): cover definitions and scopes of both formats
d-v-b Oct 25, 2026
d25a77a
test(zarr-metadata): cover repairs, v2 reads and v2 equality
d-v-b Oct 25, 2026
63db348
test(zarr-metadata): cover InScope and consolidated metadata errors
d-v-b Oct 25, 2026
0a7d342
docs(zarr-metadata): correct definition and scope docstrings
d-v-b Oct 25, 2026
61da694
docs(zarr-metadata): correct model and codec docstrings
d-v-b Oct 25, 2026
1f82f8a
docs(zarr-metadata): say the zero chunk length rules are for the v3 r…
d-v-b Oct 25, 2026
0d9893b
docs(zarr-metadata): correct changelog fragments
d-v-b Oct 25, 2026
bdd449d
refactor(zarr-metadata): convert a pydantic validation error in one p…
d-v-b Oct 25, 2026
c19a9f2
test(zarr-metadata): tighten the tests that the review of the new tes…
d-v-b Oct 25, 2026
1992fe2
docs(zarr-metadata): say that unclaimed fields compare by kind, and k…
d-v-b Oct 25, 2026
01fbe85
fix(zarr-metadata): name an unread constraint down to the TypedDict t…
d-v-b Oct 25, 2026
bd4af0b
test(zarr-metadata): type a validating parameter, and say what a cont…
d-v-b Oct 25, 2026
effe7e0
fix(zarr-metadata): report a nested TypedDict that cannot be read, ra…
d-v-b Oct 25, 2026
e684c8f
fix(zarr-metadata): stop unread_in from looking inside a TypedDict th…
d-v-b Oct 25, 2026
7e1641d
fix(zarr-metadata): look past a member that leads back when unread_in…
d-v-b Oct 25, 2026
531be10
fix(zarr-metadata): name an unread part through unions and containers…
d-v-b Oct 25, 2026
8698765
fix(zarr-metadata): look inside before reading a member's own metadat…
d-v-b Oct 25, 2026
440d264
fix(zarr-metadata): describe a bound on a member's own type when unre…
d-v-b Oct 25, 2026
3acba38
test(zarr-metadata): pin unread_in naming a bound on a member the che…
d-v-b Oct 25, 2026
9c5cf81
test(zarr-metadata): clear the pyright errors that fail the zarr-meta…
d-v-b Oct 25, 2026
ebdf698
test(zarr-metadata): run the python blocks of the README and docs as …
d-v-b Oct 26, 2026
75f0038
docs(zarr-metadata): add a page on why metadata is read in a context
d-v-b Oct 26, 2026
2557b90
update index.md
d-v-b Oct 26, 2026
40ab740
Merge branch 'main' into feat/zarr-metadata-document-context-stack
d-v-b Oct 26, 2026
899f1e5
docs(zarr-metadata): fold this pull request's 22 changelog fragments …
d-v-b Oct 26, 2026
9b25c08
docs(zarr-metadata): correct two release notes against this release's…
d-v-b Oct 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/zarr-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ on:
paths:
- 'packages/zarr-metadata/**'
- '.github/workflows/zarr-metadata.yml'
# The docs config and header script shared by all package sites.
# The docs config and header script shared by all package sites, and
# zarr-python's docs hook, which this site uses.
- 'packages/mkdocs-base.yml'
- 'packages/source-version.js'
- 'mkdocs_hooks.py'
pull_request:
paths:
- 'packages/zarr-metadata/**'
- '.github/workflows/zarr-metadata.yml'
# The docs config and header script shared by all package sites.
# The docs config and header script shared by all package sites, and
# zarr-python's docs hook, which this site uses.
- 'packages/mkdocs-base.yml'
- 'packages/source-version.js'
- 'mkdocs_hooks.py'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -102,7 +106,7 @@ jobs:
repo: casey/just
version: 1.58.0
- name: Run pyright
# The pyright version and interpreter pins live in the justfile.
# Pyright runs unpinned; the interpreter pin lives in the justfile.
run: just typecheck

docs:
Expand Down
480 changes: 372 additions & 108 deletions packages/zarr-metadata/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/zarr-metadata/changes/4365.bugfix.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
The v2 array validator follows the spec on two points it was stricter than: members outside the `.zarray` definition are tolerated and dropped (the spec says other keys ["SHOULD NOT be present ... and SHOULD be ignored"](https://github.com/zarr-developers/zarr-specs/blob/fc7dd9c9beb5a50b87f9b08b00bf50fc0048482f/docs/v2/v2.0.rst#L91-L92), unlike `.zgroup`'s ["MUST NOT"](https://github.com/zarr-developers/zarr-specs/blob/fc7dd9c9beb5a50b87f9b08b00bf50fc0048482f/docs/v2/v2.0.rst#L313)), and `filters: []` is accepted (["a list of JSON objects providing codec configurations, or null"](https://github.com/zarr-developers/zarr-specs/blob/fc7dd9c9beb5a50b87f9b08b00bf50fc0048482f/docs/v2/v2.0.rst#L76-L79) sets no minimum). The Pydantic schema follows: `ZarrV2ArrayMetadataJSON` is open and the filter pipeline has no minimum length.
The v2 array validator follows the spec on two points it was stricter than: members outside the `.zarray` definition are accepted when they are JSON values with string keys, and are kept and written back by `to_json` and `to_key_value`; any other member is a problem, as in a v3 document (the spec says other keys ["SHOULD NOT be present ... and SHOULD be ignored"](https://github.com/zarr-developers/zarr-specs/blob/fc7dd9c9beb5a50b87f9b08b00bf50fc0048482f/docs/v2/v2.0.rst#L91-L92), unlike `.zgroup`'s ["MUST NOT"](https://github.com/zarr-developers/zarr-specs/blob/fc7dd9c9beb5a50b87f9b08b00bf50fc0048482f/docs/v2/v2.0.rst#L313)), and `filters: []` is accepted (["a list of JSON objects providing codec configurations, or null"](https://github.com/zarr-developers/zarr-specs/blob/fc7dd9c9beb5a50b87f9b08b00bf50fc0048482f/docs/v2/v2.0.rst#L76-L79) sets no minimum). The JSON Schema that `zarr_metadata.pydantic` generates follows: it accepts other members, and the filter pipeline has no minimum length.
5 changes: 2 additions & 3 deletions packages/zarr-metadata/changes/4378.bugfix.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@ type checker rejected putting them into the very fields they document
declared shape no longer satisfy the closed types, and `name` /
`configuration` can no longer be mutated through `ZarrV3NamedConfigJSON`.
Both were previously accepted by type checkers but produced documents
outside the spec's shapes. `zarr_metadata.pydantic` serializers now
declare their return schema via the pydantic-facing shadow types, so
pydantic schema generation stays warning-free.
outside the spec's shapes. Generating a pydantic JSON Schema for
the `zarr_metadata.pydantic` field types no longer emits warnings.
10 changes: 4 additions & 6 deletions packages/zarr-metadata/changes/4378.misc.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
**Breaking:** every `validate_*` function in `zarr_metadata.model` now
returns `tuple[ValidationProblem, ...]` instead of `list[ValidationProblem]`,
and `MetadataValidationError.problems` is a tuple. Iteration and indexing are
unchanged; callers that mutate reports must first copy them with
`list(problems)`. `MetadataValidationError` still accepts any problem
sequence.
**Breaking:** `MetadataValidationError.problems` is now a tuple instead of
a list. Iteration and indexing are unchanged; code that changes a report
must first copy it with `list(problems)`. `MetadataValidationError` still
accepts any problem sequence.
18 changes: 7 additions & 11 deletions packages/zarr-metadata/changes/4420.bugfix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ the model refused such a document and could not read the store at all.
A node's `attributes`, a v2 `.zattrs`, the `.zattrs` entries of a v2
`.zmetadata`, and the attributes of the nodes a v3 group's inline
`consolidated_metadata` holds may now hold `NaN`, `Infinity` and
`-Infinity`, in every document `validate_*`, `parse_*` and `is_*`, and in
`from_key_value` and `to_key_value`. Wherever the spec interprets a value
it spells those numbers as strings, so anywhere else a non-finite number
is still refused, and the store reader now says where one is instead of
failing to decode the document. `is_json`, `validate_json` and
`parse_json` judge by RFC 8259 alone, so a document the node guards
accept can hold a value `is_json` refuses.
`-Infinity`, in every reader, such as `read_array_metadata_v3`, and in
each model's `from_json`, `from_key_value` and `to_key_value`. Wherever
the spec interprets a value it spells those numbers as strings, so
anywhere else a non-finite number is still refused, and the store reader
now says where one is instead of failing to decode the document.

`to_key_value` validates the document it writes as `from_key_value`
validates what it reads, and raises `MetadataValidationError` with every
problem instead of writing a document the reader refuses. A model built
by hand is not validated, so the writer is where these are caught:
A model whose document the reader refuses raises
`MetadataValidationError` with every problem, instead of being written:

- a non-finite number outside attributes, which was refused before too;
- a non-string attribute key, which was written as a string;
Expand Down
12 changes: 6 additions & 6 deletions packages/zarr-metadata/changes/4423.bugfix.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
A `bytes` or `bytearray` is not a JSON array. Where a document expects an
array, an empty one passed as an array with no items:
`parse_array_metadata_v3` returned `storage_transformers=b""`, and the v2
readers took `dtype=b""` and `filters=b""`, then failed when the model was
written. The validators and `parse_*` now refuse one at `codecs`,
`storage_transformers`, `dimension_names`, a v2 `dtype` and its field
records, and v2 `filters`.
array, an empty one passed as an array with no items: the v3 parser
returned `storage_transformers=b""`, and the v2 readers took `dtype=b""`,
then failed when the model was written. The readers and models now refuse
one at `storage_transformers` and at a v2 `dtype` and its field records. At
`codecs`, `dimension_names` and v2 `filters`, which already refused one,
the problem now says the value has the wrong type.
7 changes: 0 additions & 7 deletions packages/zarr-metadata/changes/4424.bugfix.md

This file was deleted.

7 changes: 0 additions & 7 deletions packages/zarr-metadata/changes/4429.misc.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/zarr-metadata/changes/4430.misc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`ZarrV2ZGroupJSON`, `ZarrV2GroupMetadataJSON` and its Partial are closed
`ZarrV2ZGroupJSON` and `ZarrV2GroupMetadataJSON` are closed
(PEP 728), as the spec's "Other keys MUST NOT be present" and the v2 group
validator already said, and as its pydantic schema already was. A type
checker now refuses a v2 group document with a key it does not declare.
2 changes: 1 addition & 1 deletion packages/zarr-metadata/changes/4432.feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ says neither; and each annotation is evaluated in the module of the class
that wrote it. A key a closed TypedDict does not declare is reported, as
the new problem kind `unknown_key`, and left out of the value, which still
comes back; a union of TypedDicts tagged by a `Literal` key is read by the
branch the tag names. `typeddict_keys` says what a TypedDict declares.
branch the tag names.
7 changes: 3 additions & 4 deletions packages/zarr-metadata/changes/4434.feature.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ gives wrong bytes as surely as ignoring a data type gives wrong values,
and the spec naming only three points is read as an oversight. A document
that declares a codec or a storage transformer ignorable now has a problem
at `codecs.N.must_understand` or `storage_transformers.N.must_understand`,
so the readers refuse it, and `to_key_value` refuses to write a model that
holds one. The JSON schema `zarr_metadata.pydantic` generates for an array
document says the same. A metadata field read on its own still takes
`must_understand: false`.
so the readers refuse it, and no model writes one. The JSON schema `zarr_metadata.pydantic` generates for an array
document says the same, and so does `resolve`, which reads one field on
its own.
31 changes: 15 additions & 16 deletions packages/zarr-metadata/changes/4434.feature.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
Each extension's metadata is a definition: a value holding the name the
metadata carries, the TypedDict its configuration is -- the one
declaration of that JSON -- and plain functions over that TypedDict for
the rules. `zarr_metadata.v3.definition` is the door, and its module
docstring the guide. Every extension the package models is one: the
the rules. `zarr_metadata.definition` and `zarr_metadata.v3.definition` are the
doors, and their module docstrings the guide. Every extension the package models is one: the
codecs `blosc`, `bytes`, `cast_value`, `crc32c`, `gzip`, `scale_offset`,
`sharding_indexed`, `transpose` and `zstd`; every data type, raw bits
included (`r16` reads as `r*` with `{"bits": 16}`, the size its name
carries); the `regular` and `rectilinear` chunk grids; and the `default`
included (`r16` is read by the `r*` definition with `{"bits": 16}`, the size
its name carries); the `regular` and `rectilinear` chunk grids; and the `default`
and `v2` chunk key encodings. Each is a constant in its own module --
`GZIP_CODEC`, `STRUCT_DATA_TYPE` -- and `CORE` holds what the
specification defines, `CORE_AND_EXTENSIONS` what `zarr-extensions`
registers besides. A third party writes a TypedDict, a rule function and
a definition, and extends a scope with it; a definition checks itself
a definition, and adds it to a scope; a definition checks itself
when built, and nothing happens at class creation.

Reading a field is three steps, each usable on its own by a caller
holding nothing but JSON. `check(value, SomeTypedDict)`, from
`zarr_metadata.typed_json`, type-checks JSON against a TypedDict and needs
nothing else; `definition.judge(configuration)` is the check, each nested
nothing else; `definition.read_configuration(configuration)` is the check, each nested
field's envelope judged, and then the rules; `resolve(field,
CodecDefinition, scope)` reads a whole field in a scope -- its envelope
judged, its name related to a definition, its configuration judged, each
nested field read the same way -- and returns what the scope made of it,
`Resolved`, with every problem located. A name nothing in scope claims is
`out_of_scope` and left unjudged. A shard's pipelines, a cast's target
type and a struct's field types are nested fields, annotated `CodecField`
and `DataTypeField`, and read in the scope their field is read in.
`configuration_of(resolved, GZIP_CODEC)` is a read configuration typed as
its definition's TypedDict. A codec definition also says whether the size
with every problem located. A name nothing in scope claims is left
unjudged. A shard's pipelines, a cast's target
type and a struct's field types are nested fields, annotated `ZarrV3CodecField`
and `ZarrV3DataTypeField`, and read in the scope their field is read in.
A codec definition also says whether the size
of what it gives out is `static` or `dynamic`, and a member annotated
`StaticCodecField` takes codecs of static size only: a shard's
`ZarrV3StaticCodecField` takes codecs of static size only: a shard's
`index_codecs`, where the spec forbids a compressor, so a `gzip` there is a
problem at its place.

Expand All @@ -41,11 +40,11 @@ what the rules are handed. A definition refuses a TypedDict that says
nothing of the keys it does not declare, and a member typed
`ZarrV3MetadataFieldJSON`, which would check as plain JSON.

`canonicalize(field, kind, scope)` gives a field without problems in its
`canonical_of(field, problems)` gives a field without problems in its
simplest equivalent spelling: each nested field in its own simplest
spelling, then its definition's own `canonical`, and the envelope in the
fewest words -- the bare name when nothing is configured, and no
`must_understand`. A field with any problem, an unknown key included, has
fewest words every reader takes, with no `must_understand`. A field with
any problem, an unknown key included, has
none, since a simpler spelling would erase what its author wrote. What
`canonical` gives is judged again, and one that does not hold is a
`ValueError`, a fault in the definition.
15 changes: 7 additions & 8 deletions packages/zarr-metadata/changes/4436.feature.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
**Breaking:** the v3 validators read each extension point through its
definition: `validate_array_metadata_v3` judges the data type, the chunk
**Breaking:** the v3 readers read each extension point through its
definition: `read_array_metadata_v3` judges the data type, the chunk
grid, the chunk key encoding, each codec and each storage transformer
against the definition that claims its name in a scope,
`CORE_AND_EXTENSIONS` unless a `context` is passed, so a gzip `level` of
99, or a key a codec does not declare, is a problem located in the
configuration, and a document holding one, accepted before, is refused.
So do the `is_*` and `parse_*` beside it and the v3 group validators,
with each array an inline `consolidated_metadata` holds, and the v3
model classes' `from_json`, `from_key_value` and `to_key_value` take the
same `context`, so a model read in a scope is written in it. The
pydantic types read in `CORE_AND_EXTENSIONS`. A name nothing in scope
claims is left unjudged.
So do the v3 group readers, and the v3 model classes' `from_json` and
`from_key_value` take the same `context`.
A name nothing in scope claims is left unjudged. A problem in a field
that a configuration holds, such as a codec inside a shard, is reported
at that field's own location, and the field that holds it is still read.
5 changes: 0 additions & 5 deletions packages/zarr-metadata/changes/4443.feature.1.md

This file was deleted.

2 changes: 1 addition & 1 deletion packages/zarr-metadata/changes/4443.feature.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ struct fill value missing a field are each a problem at `fill_value`,
where the package accepted them before. `fill_value_problems(data_type,
value)` judges a fill value against a data type field a scope read, and
a field that is read keeps the fields it read inside as
`Resolved.nested`, a `Nested` mapping by location. A data type nothing
`nested`, a `Nested` mapping by location. A data type nothing
in scope claims leaves its fill value unjudged.
9 changes: 4 additions & 5 deletions packages/zarr-metadata/changes/4443.feature.3.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
**Breaking:** a v3 array's `chunk_grid` is judged against its `shape`, by
the grid's definition. A regular grid whose `chunk_shape` does not have
one length per dimension of the shape, or has a length of 0 for a
dimension that is not empty, and a rectilinear grid whose `chunk_shapes`
does not have one entry per dimension, or whose chunk lengths fall short
of their dimension, each have a problem in `chunk_grid.configuration`,
where the package accepted them before.
one length per dimension of the shape, and a rectilinear grid whose
`chunk_shapes` does not have one entry per dimension, or whose chunk
lengths fall short of their dimension, each have a problem in
`chunk_grid.configuration`, where the package accepted them before.
8 changes: 4 additions & 4 deletions packages/zarr-metadata/changes/4443.feature.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ not integral, or mapping a scalar that is not a fill value of the data
type on its side; a `scale_offset` handed values that are no numbers, or
with an `offset` or `scale` that is not a value of its data type; and a
struct field whose values vary in size are each a problem where they
sit, where the package accepted them before. `read_pipeline(codecs,
chunk)` gives each codec with the chunk it is handed,
`chunk_grid_lengths(grid, shape)` the lengths a grid's chunks take, and
`storage_of(data_type)` how a data type's values are stored. A
sit, where the package accepted them before. A reading records each
codec with the chunk it is handed, as a `Stage`, and the lengths a
grid's chunks take; `storage_of(data_type)` says how a data type's
values are stored. A
definition's `rules` are handed the fields its configuration holds as
the scope read them, and the kinds gain `chunk_lengths` (grids),
`storage` (data types), and `chunk_rules` and `transition` (codecs).
17 changes: 17 additions & 0 deletions packages/zarr-metadata/changes/4490.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**Breaking:** metadata is now read against the definitions in a scope, a
`ZarrV3Context` or `ZarrV2Context` that a reader builds from the codecs,
data types and other fields it supports, and a model is the document
together with the scope it was read in. The `read_*` readers report every
problem at its location, `unclaimed_fields` lists each field the scope
does not know, so a reader can tell whether it can open a node, repair
readers undo known zarr-python writer bugs, and JSON Schemas are exported.
Code written for 0.5.0 must change: models are no longer dataclasses,
their field members hold `AcceptedField` or `UnclaimedField` values,
`update` takes JSON and takes members the spec does not define through
`extra_fields`, the `validate_*`, `is_*` and `parse_*` functions for
documents and the `...Partial` TypedDicts are removed, some names moved to
another module, the v2 constants and models follow the v3 names and
shapes, and a v2 time dtype without a unit is refused. `to_json` now
writes each field as it was read, rather than shortening a codec to a bare
name that zarr-python could not open, and zarr-metadata now depends on
`annotated-types`.
8 changes: 8 additions & 0 deletions packages/zarr-metadata/docs/api/definition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: definition
---

::: zarr_metadata.definition
options:
inherited_members: false
show_if_no_docstring: false
Loading
Loading