Skip to content

Commit

Permalink
Make make_store_path private (zarr-developers#2628)
Browse files Browse the repository at this point in the history
* Clean up public store API

* chore: make_store_path is private

---------

Co-authored-by: David Stansby <[email protected]>
  • Loading branch information
jhamman and dstansby authored Jan 8, 2025
1 parent 12f6012 commit 29ef41d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/zarr/api/asynchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,14 @@
from zarr.core.metadata import ArrayMetadataDict, ArrayV2Metadata, ArrayV3Metadata
from zarr.core.metadata.v2 import _default_compressor, _default_filters
from zarr.errors import NodeTypeValidationError
from zarr.storage import (
StoreLike,
make_store_path,
)
from zarr.storage._common import make_store_path

if TYPE_CHECKING:
from collections.abc import Iterable

from zarr.abc.codec import Codec
from zarr.core.chunk_key_encodings import ChunkKeyEncoding
from zarr.storage import StoreLike

# TODO: this type could use some more thought
ArrayLike = AsyncArray[ArrayV2Metadata] | AsyncArray[ArrayV3Metadata] | Array | npt.NDArray[Any]
Expand Down
5 changes: 3 additions & 2 deletions src/zarr/core/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
_parse_bytes_bytes_codec,
get_pipeline_class,
)
from zarr.storage import StoreLike, make_store_path
from zarr.storage._common import StorePath, ensure_no_existing_node
from zarr.storage import StoreLike
from zarr.storage._common import StorePath, ensure_no_existing_node, make_store_path

if TYPE_CHECKING:
from collections.abc import Iterator, Sequence
Expand All @@ -122,6 +122,7 @@
from zarr.abc.codec import CodecPipeline
from zarr.codecs.sharding import ShardingCodecIndexLocation
from zarr.core.group import AsyncGroup
from zarr.storage import StoreLike


# Array and AsyncArray are defined in the base ``zarr`` namespace
Expand Down
4 changes: 2 additions & 2 deletions src/zarr/core/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
from zarr.core.metadata.v3 import V3JsonEncoder
from zarr.core.sync import SyncMixin, sync
from zarr.errors import MetadataValidationError
from zarr.storage import StoreLike, StorePath, make_store_path
from zarr.storage._common import ensure_no_existing_node
from zarr.storage import StoreLike, StorePath
from zarr.storage._common import ensure_no_existing_node, make_store_path

if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Generator, Iterable, Iterator
Expand Down
3 changes: 1 addition & 2 deletions src/zarr/storage/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from types import ModuleType
from typing import Any

from zarr.storage._common import StoreLike, StorePath, make_store_path
from zarr.storage._common import StoreLike, StorePath
from zarr.storage._fsspec import FsspecStore
from zarr.storage._local import LocalStore
from zarr.storage._logging import LoggingStore
Expand All @@ -21,7 +21,6 @@
"StorePath",
"WrapperStore",
"ZipStore",
"make_store_path",
]


Expand Down
3 changes: 2 additions & 1 deletion tests/test_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from zarr.core.group import ConsolidatedMetadata, GroupMetadata
from zarr.core.sync import sync
from zarr.errors import ContainsArrayError, ContainsGroupError
from zarr.storage import LocalStore, MemoryStore, StorePath, ZipStore, make_store_path
from zarr.storage import LocalStore, MemoryStore, StorePath, ZipStore
from zarr.storage._common import make_store_path
from zarr.testing.store import LatencyStore

from .conftest import parse_store
Expand Down
3 changes: 2 additions & 1 deletion tests/test_store/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from _pytest.compat import LEGACY_PATH

from zarr.core.common import AccessModeLiteral
from zarr.storage import FsspecStore, LocalStore, MemoryStore, StoreLike, StorePath, make_store_path
from zarr.storage import FsspecStore, LocalStore, MemoryStore, StoreLike, StorePath
from zarr.storage._common import make_store_path
from zarr.storage._utils import normalize_path


Expand Down

0 comments on commit 29ef41d

Please sign in to comment.