From ffea3e723c26a5351187fef00a89469401be4107 Mon Sep 17 00:00:00 2001 From: Jacopo Abramo Date: Fri, 22 May 2026 16:49:34 +0200 Subject: [PATCH] fix: add a getter for the store path --- src/redsun/storage/_base.py | 5 +++++ src/redsun/storage/_zarr.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/redsun/storage/_base.py b/src/redsun/storage/_base.py index b1a74f7..d97723d 100644 --- a/src/redsun/storage/_base.py +++ b/src/redsun/storage/_base.py @@ -83,6 +83,11 @@ def set_store_path(self, path: PurePath) -> None: """ ... + @abc.abstractmethod + def get_store_path(self) -> PurePath | None: + """Get the currently set store path, or None if not set.""" + ... + @abc.abstractmethod def is_path_set(self) -> bool: """Check if the store path has been set.""" diff --git a/src/redsun/storage/_zarr.py b/src/redsun/storage/_zarr.py index 5bccb50..2fa32db 100644 --- a/src/redsun/storage/_zarr.py +++ b/src/redsun/storage/_zarr.py @@ -129,6 +129,9 @@ def unregister(self, datakey: str) -> None: def set_store_path(self, path: PurePath) -> None: self._store_path = path + def get_store_path(self) -> PurePath | None: + return self._store_path + def is_path_set(self) -> bool: return self._store_path is not None