From 2998561337de1c0581250183dc7a8307303a74bd Mon Sep 17 00:00:00 2001 From: Davis Bennett Date: Wed, 1 Jan 2025 22:36:19 +0100 Subject: [PATCH 1/2] remove test.py (#2612) --- test.py | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 29dac92c8b..0000000000 --- a/test.py +++ /dev/null @@ -1,7 +0,0 @@ -import zarr - -store = zarr.DirectoryStore("data") -r = zarr.open_group(store=store) -z = r.full("myArray", 42, shape=(), dtype="i4", compressor=None) - -print(z.oindex[...]) From b9699f5c5a9b1f76a7509c333277334dbc2d415d Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 2 Jan 2025 15:17:35 +0000 Subject: [PATCH 2/2] Note that whole directories can be deleted in LocalStore (#2606) --- src/zarr/storage/local.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/zarr/storage/local.py b/src/zarr/storage/local.py index f9b1747c31..f4226792cb 100644 --- a/src/zarr/storage/local.py +++ b/src/zarr/storage/local.py @@ -189,6 +189,18 @@ async def set_partial_values( await concurrent_map(args, asyncio.to_thread, limit=None) # TODO: fix limit async def delete(self, key: str) -> None: + """ + Remove a key from the store. + + Parameters + ---------- + key : str + + Notes + ----- + If ``key`` is a directory within this store, the entire directory + at ``store.root / key`` is deleted. + """ # docstring inherited self._check_writable() path = self.root / key