From b8ce8b6ea0b49be0bcdba2743214dd1bf4f99790 Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Wed, 11 Nov 2026 21:44:33 +0100 Subject: [PATCH 1/2] chore(zarr-metadata): build 0.7.0 changelog Run `towncrier build --version 0.7.0` in `packages/zarr-metadata/`, which moves the 19 pending fragments into `CHANGELOG.md`. Assisted-by: ClaudeCode:claude-opus-5-5 --- packages/zarr-metadata/CHANGELOG.md | 49 +++++++++++++++++++ .../zarr-metadata/changes/4574.bugfix.1.md | 1 - .../zarr-metadata/changes/4574.bugfix.2.md | 1 - .../zarr-metadata/changes/4574.bugfix.3.md | 1 - .../zarr-metadata/changes/4575.feature.md | 1 - .../zarr-metadata/changes/4583.feature.md | 1 - .../zarr-metadata/changes/4583.removal.md | 1 - .../zarr-metadata/changes/4588.feature.md | 1 - packages/zarr-metadata/changes/4590.doc.md | 1 - .../zarr-metadata/changes/4592.removal.md | 1 - packages/zarr-metadata/changes/4597.bugfix.md | 1 - .../zarr-metadata/changes/4597.feature.md | 1 - .../zarr-metadata/changes/4598.removal.md | 1 - .../zarr-metadata/changes/4602.feature.md | 1 - .../zarr-metadata/changes/4604.feature.md | 1 - packages/zarr-metadata/changes/4605.doc.md | 1 - packages/zarr-metadata/changes/4608.doc.md | 1 - .../zarr-metadata/changes/4609.feature.md | 1 - .../zarr-metadata/changes/4610.removal.md | 1 - packages/zarr-metadata/changes/4614.bugfix.md | 1 - 20 files changed, 49 insertions(+), 19 deletions(-) delete mode 100644 packages/zarr-metadata/changes/4574.bugfix.1.md delete mode 100644 packages/zarr-metadata/changes/4574.bugfix.2.md delete mode 100644 packages/zarr-metadata/changes/4574.bugfix.3.md delete mode 100644 packages/zarr-metadata/changes/4575.feature.md delete mode 100644 packages/zarr-metadata/changes/4583.feature.md delete mode 100644 packages/zarr-metadata/changes/4583.removal.md delete mode 100644 packages/zarr-metadata/changes/4588.feature.md delete mode 100644 packages/zarr-metadata/changes/4590.doc.md delete mode 100644 packages/zarr-metadata/changes/4592.removal.md delete mode 100644 packages/zarr-metadata/changes/4597.bugfix.md delete mode 100644 packages/zarr-metadata/changes/4597.feature.md delete mode 100644 packages/zarr-metadata/changes/4598.removal.md delete mode 100644 packages/zarr-metadata/changes/4602.feature.md delete mode 100644 packages/zarr-metadata/changes/4604.feature.md delete mode 100644 packages/zarr-metadata/changes/4605.doc.md delete mode 100644 packages/zarr-metadata/changes/4608.doc.md delete mode 100644 packages/zarr-metadata/changes/4609.feature.md delete mode 100644 packages/zarr-metadata/changes/4610.removal.md delete mode 100644 packages/zarr-metadata/changes/4614.bugfix.md diff --git a/packages/zarr-metadata/CHANGELOG.md b/packages/zarr-metadata/CHANGELOG.md index f7f3f3fa0d..e927a7c8fb 100644 --- a/packages/zarr-metadata/CHANGELOG.md +++ b/packages/zarr-metadata/CHANGELOG.md @@ -2,6 +2,55 @@ +## 0.7.0 (2026-11-11) + +### Features + +- Added `zarr_metadata.testing.strategies`, Hypothesis strategies that draw valid Zarr v3 metadata declarations, behind a new `testing` extra (`pip install zarr-metadata[testing]`). There is one strategy for every codec, data type, chunk grid and chunk key encoding the package defines that holds no other declaration. `declarations` draws every envelope spelling the spec allows, or only the canonical one with `spellings="canonical"`. Codecs can be drawn for the `Chunk` they are handed, chunk grids for an array shape, and fill values for a data type. The strategies are a mapping keyed by definition, so an extension author can add strategies for their own definitions. ([#4575](https://github.com/zarr-developers/zarr-python/pull/4575)) + +- Add the `ZARR_PYTHON_CONTEXT` scope, which reads what zarr-python writes: `CORE_AND_EXTENSIONS_CONTEXT` plus zarr-python's own data types `null_terminated_bytes` (NumPy's `S`), `raw_bytes` (NumPy's `V`) and `variable_length_bytes`, which no specification registers. `CORE_AND_EXTENSIONS_CONTEXT` now also reads the `fixed_length_utf32` data type (NumPy's `U`) and the `vlen-utf8` and `vlen-bytes` codecs that zarr-extensions registers, so the strings zarr-python writes are checked instead of read as unclaimed. ([#4583](https://github.com/zarr-developers/zarr-python/pull/4583)) + +- `zarr_metadata.v3.data_type`, `zarr_metadata.v3.codec`, `zarr_metadata.v3.chunk_grid` and `zarr_metadata.v3.chunk_key_encoding` re-export every name their submodules export, so `from zarr_metadata.v3.data_type import BoolDataTypeName, Uint8DataTypeName` works again, as it did before 0.6.0. Each name is the same object as in its submodule, which stays its documented home. ([#4588](https://github.com/zarr-developers/zarr-python/pull/4588)) + +- Added strategies to `zarr_metadata.testing.strategies` for the definitions that hold other declarations: `struct`, `cast_value` and `sharding_indexed`. Their nested declarations are drawn from the same `Strategies` mapping, so a struct's field types, a cast's target data type and a shard's codecs come from every definition the mapping holds. A new `pipelines` strategy draws a whole codec pipeline for a `Chunk`, drawing each codec for the chunk the codec before it hands on, as that codec's `transition` gives it. Shards are drawn at most one inside another, and structs likewise. Every function a strategy record holds now also takes the `Strategies` mapping as its last argument, and `declarations` reads what it draws in the scope of every definition the mapping holds. ([#4597](https://github.com/zarr-developers/zarr-python/pull/4597)) + +- Added `array_documents`, `group_documents` and `consolidated_group_documents` to `zarr_metadata.testing.strategies`, which draw whole Zarr v3 documents. An array's members are drawn to fit each other: the chunk grid for the shape, the fill value for the data type, and the codecs for the grid's chunks of that data type. `pipelines` now takes `spellings`, as `declarations` does. ([#4602](https://github.com/zarr-developers/zarr-python/pull/4602)) + +- `zarr_metadata.model.read_openable_node_metadata_v3` reads a v3 `zarr.json` as `read_node_metadata_v3` does, and also reports each declaration a reader must understand to open the node that nothing in scope claims, such as an unknown codec or an unknown top-level member without `"must_understand": false`, as a problem of the new kind `unclaimed_declaration`. Its reading has no problems exactly when a reader that understands the scope can open the node, so a validator does not have to check `unclaimed_declarations` itself. The other readers still accept unclaimed declarations, and the `from_json` and reader docstrings now point to `unclaimed_declarations` and the new reader. ([#4604](https://github.com/zarr-developers/zarr-python/pull/4604)) + +- Export `base64_fill_value_rules` from `zarr_metadata.v3.data_type.bytes`, the rule that rejects a fill value string that is not standard-alphabet base64, so a data type defined outside the package can pass it as `fill_value_rules` for a `Base64Bytes` fill value, or yield from it in a rule of its own. The guide to parsing and validation now shows how to define a data type with `fill_value_rules`. ([#4609](https://github.com/zarr-developers/zarr-python/pull/4609)) + +### Bugfixes + +- **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. ([#4574](https://github.com/zarr-developers/zarr-python/pull/4574)) + +- 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 ` Date: Wed, 11 Nov 2026 22:56:50 +0100 Subject: [PATCH 2/2] ci: retrigger workflows that GitHub left unqueued Assisted-by: ClaudeCode:claude-opus-5-5