8000 Clean up public store API (#2603) · rtobar/zarr-python@38953e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 38953e3

Browse files
authored
Clean up public store API (zarr-developers#2603)
* Clean up public store API * fix import
1 parent 4fe104a commit 38953e3

33 files changed

+39
-46
lines changed

src/zarr/core/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
get_pipeline_class,
114114
)
115115
from zarr.storage import StoreLike, make_store_path
116-
from zarr.storage.common import StorePath, ensure_no_existing_node
116+
from zarr.storage._common import StorePath, ensure_no_existing_node
117117

118118
if TYPE_CHECKING:
119119
from collections.abc import Iterator, Sequence

src/zarr/core/group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
from zarr.core.metadata.v3 import V3JsonEncoder
5151
from zarr.core.sync import SyncMixin, sync
5252
from zarr.errors import MetadataValidationError
53-
from zarr.storage import StoreLike, make_store_path
54-
from zarr.storage.common import StorePath, ensure_no_existing_node
53+
from zarr.storage import StoreLike, StorePath, make_store_path
54+
from zarr.storage._common import ensure_no_existing_node
5555

5656
if TYPE_CHECKING:
5757
from collections.abc import AsyncGenerator, Generator, Iterable, Iterator

src/zarr/storage/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
from types import ModuleType
44
from typing import Any
55

6-
from zarr.storage.common import StoreLike, StorePath, make_store_path
7-
from zarr.storage.fsspec import FsspecStore
8-
from zarr.storage.local import LocalStore
9-
from zarr.storage.logging import LoggingStore
10-
from zarr.storage.memory import MemoryStore
11-
from zarr.storage.wrapper import WrapperStore
12-
from zarr.storage.zip import ZipStore
6+
from zarr.storage._common import StoreLike, StorePath, make_store_path
7+
from zarr.storage._fsspec import FsspecStore
8+
from zarr.storage._local import LocalStore
9+
from zarr.storage._logging import LoggingStore
10+
from zarr.storage._memory import GpuMemoryStore, MemoryStore
11+
from zarr.storage._wrapper import WrapperStore
12+
from zarr.storage._zip import ZipStore
1313

1414
__all__ = [
1515
"FsspecStore",
16+
"GpuMemoryStore",
1617
"LocalStore",
1718
"LoggingStore",
1819
"MemoryStore",

src/zarr/storage/common.py renamed to src/zarr/storage/_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from zarr.core.buffer import Buffer, default_buffer_prototype
99
from zarr.core.common import ZARR_JSON, ZARRAY_JSON, ZGROUP_JSON, AccessModeLiteral, ZarrFormat
1010
from zarr.errors import ContainsArrayAndGroupError, ContainsArrayError, ContainsGroupError
11+
from zarr.storage._local import LocalStore
12+
from zarr.storage._memory import MemoryStore
1113
from zarr.storage._utils import normalize_path
12-
from zarr.storage.local import LocalStore
13-
from zarr.storage.memory import MemoryStore
1414

1515
if TYPE_CHECKING:
1616
from zarr.core.buffer import BufferPrototype
@@ -281,7 +281,7 @@ async def make_store_path(
281281
TypeError
282282
If the StoreLike object is not one of the supported types.
283283
"""
284-
from zarr.storage.fsspec import FsspecStore # circular import
284+
from zarr.storage._fsspec import FsspecStore # circular import
285285

286286
used_storage_options = False
287287
path_normalized = normalize_path(path)

src/zarr/storage/fsspec.py renamed to src/zarr/storage/_fsspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import TYPE_CHECKING, Any
55

66
from zarr.abc.store import ByteRangeRequest, Store
7-
from zarr.storage.common import _dereference_path
7+
from zarr.storage._common import _dereference_path
88

99
if TYPE_CHECKING:
1010
from collections.abc import AsyncIterator, Iterable
File renamed without changes.

src/zarr/storage/logging.py renamed to src/zarr/storage/_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import TYPE_CHECKING, Any
99

1010
from zarr.abc.store import Store
11-
from zarr.storage.wrapper import WrapperStore
11+
from zarr.storage._wrapper import WrapperStore
1212

1313
if TYPE_CHECKING:
1414
from collections.abc import AsyncIterator, Generator, Iterable
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
0