Skip to content

Commit 10f42cb

Browse files
committed
Add class store
1 parent 2ba0d2a commit 10f42cb

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
11
# -*- coding: utf-8 -*-
22
"""
33
"""
4+
5+
class Store:
6+
def __init__(self):
7+
self.store = None
8+
9+
def from_netcdf(self):
10+
raise Exception()
11+
12+
def from_zarr(self):
13+
raise Exception()
14+
15+
def to_netcdf(self):
16+
raise Exception()
17+
18+
def to_zarr(self):
19+
raise Exception()
20+
21+
def __getitem__(self, item):
22+
if isinstance(item, slice):
23+
raise Exception()
24+
else:
25+
return self.store[item]
26+
27+
def __len__(self):
28+
return self.store.size
29+
30+
def __eq__(self, other):
31+
raise Exception()
32+
33+
def __iter__(self):
34+
raise Exception()
35+
36+
def reset(self):
37+
raise Exception()
38+
39+
def fields(self):
40+
raise Exception()
41+
42+
class ZarrMemoryStore(Store):
43+
pass
44+
45+
class RecordArrayStore(Store):
46+
pass

tests/test_store.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from py_eddy_tracker.observations import ZarrMemoryStore, RecordArrayStore
2+
3+
def test_add_field():
4+
pass
5+
6+
def test_slicing():
7+
pass
8+
9+
def test_indexing():
10+
pass
11+
12+
def test_field():
13+
pass
14+
15+
def test_size():
16+
pass
17+
18+
def test_reordering():
19+
pass

0 commit comments

Comments
 (0)