Skip to content

Commit

Permalink
rev
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Oct 13, 2020
1 parent fe3a066 commit a54e061
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion zarr/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def _dict_store_keys(d: Dict, prefix="", cls=dict):
yield prefix + k


class Store(MutableMapping):
class Store:
"""Base class for stores implementation.
Expand Down Expand Up @@ -558,6 +558,16 @@ def close(self) -> None:
pass


class KVStore(Store):
"""
This provide an default implementation of a store interface around
a mutable mapping, to avoid havign to test stores for presence of methods
"""

def __init__(self):
pass


class MemoryStore(Store):
"""Store class that uses a hierarchy of :class:`dict` objects, thus all data
will be held in main memory.
Expand Down
2 changes: 1 addition & 1 deletion zarr/tests/test_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class TestGroup(unittest.TestCase):
@staticmethod
def create_store():
# can be overridden in sub-classes
return MemoryStore(), None
return dict(), None

def create_group(self, store=None, path=None, read_only=False,
chunk_store=None, synchronizer=None):
Expand Down

0 comments on commit a54e061

Please sign in to comment.