Skip to content

Commit

Permalink
Sync with new store api
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiannucci committed Oct 12, 2024
1 parent 5e6551d commit d174bf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion icechunk-python/python/icechunk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(
**kwargs: Any,
):
"""Create a new IcechunkStore. This should not be called directly, instead use the create or open_existing class methods."""
super().__init__(mode, *args, **kwargs)
super().__init__(*args, mode=mode, **kwargs)
if store is None:
raise ValueError(
"An IcechunkStore should not be created with the default constructor, instead use either the create or open_existing class methods."
Expand Down
9 changes: 6 additions & 3 deletions icechunk-python/tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ async def tmp_store(tmpdir):
async def test_no_inline_chunks(tmp_store):
store = tmp_store[0]
store_path = tmp_store[1]
array = zarr.create(
array = zarr.open_array(
store=store,
mode="a",
shape=(10),
dtype="int64",
zarr_format=3,
Expand All @@ -42,8 +43,9 @@ async def test_inline_chunks(tmp_store):
store = tmp_store[0]
store_path = tmp_store[1]

inline_array = zarr.create(
inline_array = zarr.open_array(
store=store,
mode="a",
path="inline",
shape=(10),
dtype="int32",
Expand All @@ -58,8 +60,9 @@ async def test_inline_chunks(tmp_store):
# inline_chunk_threshold is 40, we should have no chunks directory
assert not os.path.isdir(f"{store_path}/chunks")

written_array = zarr.create(
written_array = zarr.open_array(
store=store,
mode="a",
path="not_inline",
shape=(10),
dtype="int64",
Expand Down

0 comments on commit d174bf7

Please sign in to comment.