Repository navigation
Migration to zarr 3 - #112
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Implementation looks good!
However, I'd like to go for the following changes which would need also some documentation changes:
- Make Zarr 3 the new default format, because it is the better format.
zarr_versionshould be deprecated,zarr_formatbe used instead to align with the API.Requirezarr_formatsetting in new configurations. If it is missing assume an old config that refers to the old defaultzarr_version=2and sozarr_format=2. Emit a warning in this case.shardssetting should be ignored with a warning if it is not applicable.
EDIT
- Require
zarr_format=2|3setting in new configurations and acceptzarr_version=2in old configurations. If either is missing, raise.
| desired and the variable's data array will be persisted as one block. | ||
|
|
||
| For Zarr v3, `shards` may additionally be configured for a variable. A shard | ||
| contains an integer number of regular chunks, reducing object counts while |
There was a problem hiding this comment.
| contains an integer number of regular chunks, reducing object counts while | |
| contains an integer number of regular chunks, reducing file or object counts while |
| contains an integer number of regular chunks, reducing object counts while | ||
| retaining smaller read/write chunks. Each shard size must be at least its | ||
| corresponding chunk size and an exact multiple of it. Shards are not available | ||
| for Zarr v2. |
There was a problem hiding this comment.
| for Zarr v2. | |
| for Zarr v2, hence the `shards` setting will be ignored. |
| @@ -603,7 +611,7 @@ | |||
| "zarr_version": { | |||
There was a problem hiding this comment.
Deprecate zarr_version and introduce zarr_format (to align with Zarr API).
| "description": "The Zarr version to be used.", | ||
| "const": DEFAULT_ZARR_VERSION, | ||
| "enum": [2, 3], | ||
| "default": DEFAULT_ZARR_VERSION, |
There was a problem hiding this comment.
| "default": DEFAULT_ZARR_VERSION, | |
| "default": DEFAULT_ZARR_FORMAT, |
There was a problem hiding this comment.
| DEFAULT_ZARR_FORMAT, |
| target_store: collections.abc.MutableMapping, | ||
| target_ds: xr.Dataset, | ||
| target_attrs: dict[str, Any], | ||
| zarr_version: int, |
There was a problem hiding this comment.
| zarr_version: int, | |
| zarr_format: int, |
| @@ -1,5 +1,7 @@ | |||
| ## Version 0.8.1 (in development) | |||
|
|
|||
| * Migrated to the Zarr v3 Python API. Supports writing Zarr v2 and v3 stores, | |||
There was a problem hiding this comment.
| * Migrated to the Zarr v3 Python API. Supports writing Zarr v2 and v3 stores, | |
| * Migrated to use `zarr >=3`. Supports writing Zarr v2 and v3 stores, |
| @@ -1,5 +1,7 @@ | |||
| ## Version 0.8.1 (in development) | |||
There was a problem hiding this comment.
| ## Version 0.8.1 (in development) | |
| ## Version 0.9.0 (in development) |
There was a problem hiding this comment.
This PR is a major change of the implementation and a capability enhancement. This justifies a minor number increase.
| ## Version 0.8.1 (in development) | ||
|
|
||
| * Migrated to the Zarr v3 Python API. Supports writing Zarr v2 and v3 stores, | ||
| with Zarr v2 as the default. (#111) |
There was a problem hiding this comment.
| with Zarr v2 as the default. (#111) | |
| with Zarr 3 as the new default format. (#111) |
| [Zarr format](https://zarr.readthedocs.io/en/stable/). Targets use Zarr v2 by | ||
| default and may opt into Zarr v3. If an error |
There was a problem hiding this comment.
| [Zarr format](https://zarr.readthedocs.io/en/stable/). Targets use Zarr v2 by | |
| default and may opt into Zarr v3. If an error | |
| [Zarr format](https://zarr.readthedocs.io/en/stable/). Targets use Zarr 3 format by | |
| default and may opt into Zarr 2 format, if needed. If an error |
Linking related issue: #107 |
34577db to
242b875
Compare
|
Closes #107 |
forman
left a comment
There was a problem hiding this comment.
All good, but the package version is still "0.8.1.dev0". Please change to "0.9.0.dev0".
Migrated to the Zarr v3 Python API. Supports writing Zarr v2 and v3 stores, with Zarr v2 as the default.
closes #111
Checklist (strike out non-applicable):
CHANGES.mdCHANGES.mddocs/*