Releases: zarr-developers/pydantic-zarr
v0.7.0
What's Changed
That PR contains:
docs:
- a bunch of prose improvements, some new sections, and some broken links removed
ArraySpec.from_array
- When chunks is "auto", use guess_chunks from zarr-python instead of defaulting to a single chunk. A single chunk is completely wrong for large arrays.
- expand the function signature of
from_array
to explicitly list the relevant parameters of theArraySpec
constructor (banishing**kwargs
code smell), - make each parameter default to "auto", which dispatches to functions that attempt to infer an attribute value from the input data. The default behavior now is that an array with an
attrs
attribute will have theattrs
propagate to the resultingArraySpec.attributes
, and similarly forchunks
(in the case of this specific attribute, we also check forchunksize
to accomodate dask arrays). If this ends up being terrible I will revert it.
to_zarr
- overwrite is an explicit keyword-only argument
support for python 3.9
- import TypeAlias from typing_extensions
- add some little pydantic dependency that enables the modern union | operator
- add python 3.9 to the test matrix in ci
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
-
add
to_flat
,from_flat
by @d-v-b in #25.
These methods allow creatingGroupSpec
instances to / from a flat "dict of strings" representation of a hierarchy. -
add
like
method forGroupSpec
andArraySpec
by @d-v-b in #25
This method allows for parametrically comparingGroupSpec
andArraySpec
instances to otherGroup/ArraySpec
, or tozarr.Group
orzarr.Array
. -
add
depth
kwarg toGroupSpec.from_zarr
that limits the depth of tree traversal. by @d-v-b in #25 -
[breaking]
GroupSpec.members
is nullable, to accommodate the flat hierarchy representation, and to accommodate limiting recursion depth inGroupSpec.from_zarr
by @d-v-b in #25.
Full Changelog: v0.5.2...v0.6.0
0.5.2
0.5.1
0.5.0
What's Changed
- docs: fix typo by @d-v-b in #8
- Fix doc link by @d-v-b in #11
- Items to members by @d-v-b in #12
⚠️ This is a breaking change! theitems
property ofGroupSpec
has been renamed tomembers
to prevent aliasing with theitems
method of python mutable mappings⚠️ .
Full Changelog: v0.4.0...v0.5.0