From b6e697f2b694cbb0f7ad7149d4ba37ccbdcea301 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 10 Apr 2025 13:10:33 +0200 Subject: [PATCH] More consistent store docstrings --- src/zarr/storage/_fsspec.py | 2 +- src/zarr/storage/_local.py | 2 +- src/zarr/storage/_logging.py | 2 +- src/zarr/storage/_memory.py | 8 +++++--- src/zarr/storage/_obstore.py | 3 ++- src/zarr/storage/_wrapper.py | 3 ++- src/zarr/storage/_zip.py | 2 +- 7 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/zarr/storage/_fsspec.py b/src/zarr/storage/_fsspec.py index a4730a93d9..40f1b2fbc0 100644 --- a/src/zarr/storage/_fsspec.py +++ b/src/zarr/storage/_fsspec.py @@ -32,7 +32,7 @@ class FsspecStore(Store): """ - A remote Store based on FSSpec + Store for remote data based on FSSpec. Parameters ---------- diff --git a/src/zarr/storage/_local.py b/src/zarr/storage/_local.py index bd5bfc1da2..85d244f17b 100644 --- a/src/zarr/storage/_local.py +++ b/src/zarr/storage/_local.py @@ -67,7 +67,7 @@ def _put( class LocalStore(Store): """ - Local file system store. + Store for the local file system. Parameters ---------- diff --git a/src/zarr/storage/_logging.py b/src/zarr/storage/_logging.py index 5f1a97acd9..a2164a418f 100644 --- a/src/zarr/storage/_logging.py +++ b/src/zarr/storage/_logging.py @@ -24,7 +24,7 @@ class LoggingStore(WrapperStore[T_Store]): """ - Store wrapper that logs all calls to the wrapped store. + Store that logs all calls to another wrapped store. Parameters ---------- diff --git a/src/zarr/storage/_memory.py b/src/zarr/storage/_memory.py index b37fc8d5c9..ea25f82a3b 100644 --- a/src/zarr/storage/_memory.py +++ b/src/zarr/storage/_memory.py @@ -19,7 +19,7 @@ class MemoryStore(Store): """ - In-memory store. + Store for local memory. Parameters ---------- @@ -173,8 +173,10 @@ async def list_dir(self, prefix: str) -> AsyncIterator[str]: class GpuMemoryStore(MemoryStore): - """A GPU only memory store that stores every chunk in GPU memory irrespective - of the original location. + """ + Store for GPU memory. + + Stores every chunk in GPU memory irrespective of the original location. The dictionary of buffers to initialize this memory store with *must* be GPU Buffers. diff --git a/src/zarr/storage/_obstore.py b/src/zarr/storage/_obstore.py index 79afa08d15..c40048082f 100644 --- a/src/zarr/storage/_obstore.py +++ b/src/zarr/storage/_obstore.py @@ -37,7 +37,8 @@ class ObjectStore(Store): - """A Zarr store that uses obstore for fast read/write from AWS, GCP, Azure. + """ + Store that uses obstore for fast read/write from AWS, GCP, Azure. Parameters ---------- diff --git a/src/zarr/storage/_wrapper.py b/src/zarr/storage/_wrapper.py index 349048e495..f21d378191 100644 --- a/src/zarr/storage/_wrapper.py +++ b/src/zarr/storage/_wrapper.py @@ -18,7 +18,8 @@ class WrapperStore(Store, Generic[T_Store]): """ - A store class that wraps an existing ``Store`` instance. + Store that wraps an existing Store. + By default all of the store methods are delegated to the wrapped store instance, which is accessible via the ``._store`` attribute of this class. diff --git a/src/zarr/storage/_zip.py b/src/zarr/storage/_zip.py index bbfe6c67aa..f9eb8d8808 100644 --- a/src/zarr/storage/_zip.py +++ b/src/zarr/storage/_zip.py @@ -24,7 +24,7 @@ class ZipStore(Store): """ - Storage class using a ZIP file. + Store using a ZIP file. Parameters ----------