Skip to content

Commit 3bc305e

Browse files
authored
Listable V3 Stores (#1634)
* basic support for v2 and v3 groups * second rev on group apis - removed abcs for groups/arrays - improved return types in group.py - warn (temporarily) when an implicit group is found - add attributes.py with Attributes class add test file wip * progress on store interface (memory and local stores only) fixes after rebas e make all tests pass
1 parent 9e3e8c0 commit 3bc305e

22 files changed

+4193
-4132
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ src/zarr/_version.py
7878
#doesnotexist
7979
#test_sync*
8080
data/*
81+
src/fixture/
8182

8283
.DS_Store

src/zarr/v3/__init__.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@
66
from zarr.v3.array import Array # noqa: F401
77
from zarr.v3.array_v2 import ArrayV2 # noqa: F401
88
from zarr.v3.group import Group # noqa: F401
9-
from zarr.v3.group_v2 import GroupV2 # noqa: F401
109
from zarr.v3.metadata import RuntimeConfiguration, runtime_configuration # noqa: F401
1110
from zarr.v3.store import ( # noqa: F401
12-
LocalStore,
13-
RemoteStore,
14-
Store,
1511
StoreLike,
16-
StorePath,
1712
make_store_path,
1813
)
1914
from zarr.v3.sync import sync as _sync
@@ -22,18 +17,18 @@
2217
async def open_auto_async(
2318
store: StoreLike,
2419
runtime_configuration_: RuntimeConfiguration = RuntimeConfiguration(),
25-
) -> Union[Array, ArrayV2, Group, GroupV2]:
20+
) -> Union[Array, ArrayV2, Group]:
2621
store_path = make_store_path(store)
2722
try:
28-
return await Group.open_or_array(store_path, runtime_configuration=runtime_configuration_)
23+
return await Array.open(store_path, runtime_configuration=runtime_configuration_)
2924
except KeyError:
30-
return await GroupV2.open_or_array(store_path, runtime_configuration_)
25+
return await Group.open(store_path, runtime_configuration=runtime_configuration_)
3126

3227

3328
def open_auto(
3429
store: StoreLike,
3530
runtime_configuration_: RuntimeConfiguration = RuntimeConfiguration(),
36-
) -> Union[Array, ArrayV2, Group, GroupV2]:
31+
) -> Union[Array, ArrayV2, Group]:
3732
return _sync(
3833
open_auto_async(store, runtime_configuration_),
3934
runtime_configuration_.asyncio_loop,

src/zarr/v3/abc/array.py

Lines changed: 0 additions & 140 deletions
This file was deleted.

src/zarr/v3/abc/group.py

Lines changed: 0 additions & 86 deletions
This file was deleted.

0 commit comments

Comments
 (0)