Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions packages/zarr-metadata/changes/4574.bugfix.1.md
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
**Breaking:** A problem in a v2 struct dtype is located where the document
writes it. A record's problem was located under a `fields` key the
document does not have, at `("dtype", "fields", 0, 1)`; it is now at
`("dtype", 0, 1)`, and carries the value found there as its `input`.
`declarations()` places each record's type there too. A definition's
functions still find the record types in `nested` at
`("fields", 0, 1)`, their place in the configuration.
**Breaking:** Every problem is now located where the document writes the value. The v2 readers and the v2 models' `from_key_value` locate a problem in the file that holds it, such as `(".zarray", "order")` or `(".zattrs", "x")`, instead of in the merged document, and a v2 array node reading's `at` is now `(".zarray",)`. A problem in a v2 struct record is at `("dtype", 0, 1)` instead of under a `fields` key the document does not have, a codec's missing configuration member, such as the `endian` of a `bytes` codec, is reported inside the configuration it writes, or at `codecs.N.configuration` when it writes none, and a codec handed values it cannot encode is reported at `codecs.N` however it is spelled.
5 changes: 0 additions & 5 deletions packages/zarr-metadata/changes/4574.bugfix.10.md

This file was deleted.

5 changes: 1 addition & 4 deletions packages/zarr-metadata/changes/4574.bugfix.2.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
A v2 dtype written as the string `"struct"` is refused as a string that is
not a NumPy typestr, like any other, instead of being read as a struct
with no records. `struct` is the name the definition of a records array
is filed under, not part of the v2 dtype grammar.
**Breaking:** The v2 readers now agree with the v3 readers. A `.zarray` member the spec does not define may hold `NaN` and the infinities, a `.zmetadata` key that does not name its node's path, such as `/a/.zarray`, is refused instead of being read as the node at `a`, and a `.zgroup` that holds `attributes` is an `invalid_value` rather than an `unknown_key`, so a caller who tolerates unknown keys no longer drops those attributes.
6 changes: 1 addition & 5 deletions packages/zarr-metadata/changes/4574.bugfix.3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
A group listed in v3 consolidated metadata whose own document has a problem,
such as attributes that are not an object, is reported for that problem
alone. It was also reported for disagreeing with the outer listing's copy
of the same node, a difference that came only from the problem. A copy
whose only problem is an unknown key is still compared.
Various mistakes in v2 and consolidated metadata are now reported once, at their own location, with the right kind and message. A float where an integer from a fixed set is required, such as `"zarr_format": 2.0`, is an `invalid_type`, and a v2 typestr with a part its family does not take, such as `<f4[ns]`, or a time typestr without a unit, is a single `invalid_value` that names the part. A struct record of the wrong length or with a non-string name, the string `"struct"` given as a v2 dtype, a node that v3 consolidated metadata lists and whose own document has a problem, and a malformed inline `consolidated_metadata` member are each reported for their own problem alone, with the value found there as the problem's `input`.
7 changes: 0 additions & 7 deletions packages/zarr-metadata/changes/4574.bugfix.4.md

This file was deleted.

11 changes: 0 additions & 11 deletions packages/zarr-metadata/changes/4574.bugfix.5.md

This file was deleted.

8 changes: 0 additions & 8 deletions packages/zarr-metadata/changes/4574.bugfix.6.md

This file was deleted.

12 changes: 0 additions & 12 deletions packages/zarr-metadata/changes/4574.bugfix.7.md

This file was deleted.

4 changes: 0 additions & 4 deletions packages/zarr-metadata/changes/4574.bugfix.8.md

This file was deleted.

12 changes: 0 additions & 12 deletions packages/zarr-metadata/changes/4574.bugfix.9.md

This file was deleted.

11 changes: 1 addition & 10 deletions packages/zarr-metadata/changes/4592.removal.md
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
Rename the word for a value at an extension point: it is now a *declaration* (it was a *field*). A name/value pair in a JSON metadata object stays a *member*. The package already said *field* in the JSON sense in `extra_fields`, `ExtraFieldDefinition`, `ZarrV3ExtensionField` and `must_understand_fields`, after the spec's "additional fields", so one word meant two things. The public names change with no aliases:

- `AcceptedField`, `UnclaimedField`, `RefusedField` and `ResolvedField` are now `AcceptedDeclaration`, `UnclaimedDeclaration`, `RefusedDeclaration` and `ResolvedDeclaration`.
- `ZarrV3DataTypeField`, `ZarrV3ChunkGridField`, `ZarrV3ChunkKeyEncodingField`, `ZarrV3CodecField`, `ZarrV3StaticCodecField`, `ZarrV3StorageTransformerField` and `ZarrV2DataTypeField` are now the same names ending in `Declaration`, and a kind's `field_aliases` is now `declaration_aliases`.
- `ZarrV3MetadataFieldJSON` is now `ZarrV3DeclarationJSON`, and `field_json_schema_v3` is now `declaration_json_schema_v3`.
- A reading's `fields()` is now `declarations()`, and a model's `unclaimed_fields` is now `unclaimed_declarations`.
- The first parameter of `with_problems` is now `declarations` (it was `fields`).
- The JSON Schemas that `node_metadata_json_schema_v3` and `declaration_json_schema_v3` write name each alias under `$defs` by its new name, so a `$ref` to `#/$defs/ZarrV3CodecField` is now `#/$defs/ZarrV3CodecDeclaration`, and likewise for the other kinds.

Messages that said *field* or *metadata field* for an extension-point value now say *declaration*, as in "expected a declaration (string or extension object)". Prose that said *extra member* or *extension member* now says *extra field* and *extension field*, after the names. `extra_fields`, `ExtraFieldDefinition`, `ZarrV3ExtensionField`, `StructField` and the pydantic `...MetadataField` types keep their names.
**Breaking:** The value found at an extension point, a data type, chunk grid, chunk key encoding, codec or storage transformer, is now called a *declaration*. The word *field* also meant a key of a metadata object, as in `extra_fields`, so one word meant two things. The public names change with no aliases: `AcceptedField`, `UnclaimedField`, `RefusedField` and `ResolvedField` end in `Declaration`, as do `ZarrV3CodecField` and the other kind-specific `...Field` types; a reading's `fields()` is `declarations()`; a model's `unclaimed_fields` is `unclaimed_declarations`; `ZarrV3MetadataFieldJSON` is `ZarrV3DeclarationJSON`; `field_json_schema_v3` is `declaration_json_schema_v3`; a kind's `field_aliases` is `declaration_aliases`; the first parameter of `with_problems` is `declarations`; and the JSON Schema `$defs` use the new names. `extra_fields`, `ExtraFieldDefinition`, `ZarrV3ExtensionField` and `StructField` keep their names.
Loading