Skip to content

Commit 846c085

Browse files
normanrzd-v-bjhamman
authored
Reworked codec pipelines (#1670)
* merge * refactors CodecPipelines * fixes * adds HybridCodecPipeline * fixes * typing * typing * consistent naming * Apply suggestions from code review Co-authored-by: Davis Bennett <[email protected]> * encode/decode are batched by default * use zarr.config for batch_size * don't use global lru_cache * removes HybridCodecPipeline * generic codec classes * default batch size = 1 * default batch size = 1 * docs * Update src/zarr/codecs/batched_codec_pipeline.py Co-authored-by: Joe Hamman <[email protected]> * mv batched_codec_pipeline -> pipeline * Remove ArrayV2 (#1857) * adds wrapper codecs for the v2 codec pipeline * encode_chunk_key * refactor ArrayV2 away * empty zattrs * Apply suggestions from code review Co-authored-by: Davis Bennett <[email protected]> * unify ArrayMetadata * abstract ArrayMetadata * unified Array.create * use zarr.config for batch_size * __init__.py aktualisieren Co-authored-by: Joe Hamman <[email protected]> * ruff --------- Co-authored-by: Davis Bennett <[email protected]> Co-authored-by: Joe Hamman <[email protected]> * merge --------- Co-authored-by: Davis Bennett <[email protected]> Co-authored-by: Joe Hamman <[email protected]>
1 parent ceee364 commit 846c085

29 files changed

+1711
-1257
lines changed

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,6 @@ check_untyped_defs = false
207207
module = [
208208
"zarr.v2.*",
209209
"zarr.abc.codec",
210-
"zarr.codecs.bytes",
211-
"zarr.codecs.pipeline",
212-
"zarr.codecs.sharding",
213-
"zarr.codecs.transpose",
214210
"zarr.array_v2",
215211
]
216212
disallow_any_generics = false

src/zarr/__init__.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from __future__ import annotations
22

3-
from typing import Union
4-
53
import zarr.codecs # noqa: F401
64
from zarr.array import Array, AsyncArray
7-
from zarr.array_v2 import ArrayV2
85
from zarr.config import config # noqa: F401
96
from zarr.group import AsyncGroup, Group
107
from zarr.store import (
@@ -18,19 +15,15 @@
1815
assert not __version__.startswith("0.0.0")
1916

2017

21-
async def open_auto_async(
22-
store: StoreLike,
23-
) -> Union[AsyncArray, AsyncGroup]:
18+
async def open_auto_async(store: StoreLike) -> AsyncArray | AsyncGroup:
2419
store_path = make_store_path(store)
2520
try:
2621
return await AsyncArray.open(store_path)
2722
except KeyError:
2823
return await AsyncGroup.open(store_path)
2924

3025

31-
def open_auto(
32-
store: StoreLike,
33-
) -> Union[Array, ArrayV2, Group]:
26+
def open_auto(store: StoreLike) -> Array | Group:
3427
object = _sync(
3528
open_auto_async(store),
3629
)

0 commit comments

Comments
 (0)