-
-
Notifications
You must be signed in to change notification settings - Fork 329
Have a BaseStore class ? #600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
One thing that might be nice is to have a store that wraps a minimal |
see https://github.com/manzt/napari-dzi-zarr/blob/master/napari_dzi_zarr/store.py from @manzt for a possible consumer of a base class. |
there seem to be a number of place where the test assumes that stores can do things quite differently than what I was expecting and where Typically things like
Will pass for dict, but or
Where MemoryStore will be quite unhappy because So i'm unsure which is the "correct" behavior. |
Done in PR ( #789 ) and preceding work |
Thi is a suggestion to have a
BaseStore
class or ABC, that store implementations can inherit from to have basic functionality.Problem description
Saying that stores are "just"
MutableMapping
may be insufficient, a number of places call methods on stores that are not available inMutableMapping
, which:MutableMapping
as a type annotation.close()
method that is no-op, and would avoid the need to check for method existence.def __len__(self): return len(self.keys())
, still allowing overwrite.The text was updated successfully, but these errors were encountered: