From d174bf764b539436385d592e0a0d0140826b949b Mon Sep 17 00:00:00 2001 From: Matthew Iannucci Date: Sat, 12 Oct 2024 09:24:12 -0400 Subject: [PATCH] Sync with new store api --- icechunk-python/python/icechunk/__init__.py | 2 +- icechunk-python/tests/test_config.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/icechunk-python/python/icechunk/__init__.py b/icechunk-python/python/icechunk/__init__.py index c94851fe..7d96b77f 100644 --- a/icechunk-python/python/icechunk/__init__.py +++ b/icechunk-python/python/icechunk/__init__.py @@ -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." diff --git a/icechunk-python/tests/test_config.py b/icechunk-python/tests/test_config.py index e95828e3..b9d42f48 100644 --- a/icechunk-python/tests/test_config.py +++ b/icechunk-python/tests/test_config.py @@ -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, @@ -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", @@ -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",