@@ -564,11 +564,11 @@ async def test_asyncgroup_getitem(store: LocalStore | MemoryStore, zarr_format:
564
564
"""
565
565
agroup = await AsyncGroup .create (store = store , zarr_format = zarr_format )
566
566
567
- sub_array_path = "sub_array"
567
+ array_name = "sub_array"
568
568
sub_array = await agroup .create_array (
569
- path = sub_array_path , shape = (10 ,), dtype = "uint8" , chunk_shape = (2 ,)
569
+ name = array_name , shape = (10 ,), dtype = "uint8" , chunk_shape = (2 ,)
570
570
)
571
- assert await agroup .getitem (sub_array_path ) == sub_array
571
+ assert await agroup .getitem (array_name ) == sub_array
572
572
573
573
sub_group_path = "sub_group"
574
574
sub_group = await agroup .create_group (sub_group_path , attributes = {"foo" : 100 })
@@ -581,29 +581,29 @@ async def test_asyncgroup_getitem(store: LocalStore | MemoryStore, zarr_format:
581
581
582
582
async def test_asyncgroup_delitem (store : LocalStore | MemoryStore , zarr_format : ZarrFormat ) -> None :
583
583
agroup = await AsyncGroup .create (store = store , zarr_format = zarr_format )
584
- sub_array_path = "sub_array"
584
+ array_name = "sub_array"
585
585
_ = await agroup .create_array (
586
- path = sub_array_path , shape = (10 ,), dtype = "uint8" , chunk_shape = (2 ,), attributes = {"foo" : 100 }
586
+ name = array_name , shape = (10 ,), dtype = "uint8" , chunk_shape = (2 ,), attributes = {"foo" : 100 }
587
587
)
588
- await agroup .delitem (sub_array_path )
588
+ await agroup .delitem (array_name )
589
589
590
590
# todo: clean up the code duplication here
591
591
if zarr_format == 2 :
592
- assert not await agroup .store_path .store .exists (sub_array_path + "/" + ".zarray" )
593
- assert not await agroup .store_path .store .exists (sub_array_path + "/" + ".zattrs" )
592
+ assert not await agroup .store_path .store .exists (array_name + "/" + ".zarray" )
593
+ assert not await agroup .store_path .store .exists (array_name + "/" + ".zattrs" )
594
594
elif zarr_format == 3 :
595
- assert not await agroup .store_path .store .exists (sub_array_path + "/" + "zarr.json" )
595
+ assert not await agroup .store_path .store .exists (array_name + "/" + "zarr.json" )
596
596
else :
597
597
raise AssertionError
598
598
599
599
sub_group_path = "sub_group"
600
600
_ = await agroup .create_group (sub_group_path , attributes = {"foo" : 100 })
601
601
await agroup .delitem (sub_group_path )
602
602
if zarr_format == 2 :
603
- assert not await agroup .store_path .store .exists (sub_array_path + "/" + ".zgroup" )
604
- assert not await agroup .store_path .store .exists (sub_array_path + "/" + ".zattrs" )
603
+ assert not await agroup .store_path .store .exists (array_name + "/" + ".zgroup" )
604
+ assert not await agroup .store_path .store .exists (array_name + "/" + ".zattrs" )
605
605
elif zarr_format == 3 :
606
- assert not await agroup .store_path .store .exists (sub_array_path + "/" + "zarr.json" )
606
+ assert not await agroup .store_path .store .exists (array_name + "/" + "zarr.json" )
607
607
else :
608
608
raise AssertionError
609
609
@@ -615,7 +615,7 @@ async def test_asyncgroup_create_group(
615
615
agroup = await AsyncGroup .create (store = store , zarr_format = zarr_format )
616
616
sub_node_path = "sub_group"
617
617
attributes = {"foo" : 999 }
618
- subnode = await agroup .create_group (path = sub_node_path , attributes = attributes )
618
+ subnode = await agroup .create_group (name = sub_node_path , attributes = attributes )
619
619
620
620
assert isinstance (subnode , AsyncGroup )
621
621
assert subnode .attrs == attributes
@@ -645,7 +645,7 @@ async def test_asyncgroup_create_array(
645
645
646
646
sub_node_path = "sub_array"
647
647
subnode = await agroup .create_array (
648
- path = sub_node_path ,
648
+ name = sub_node_path ,
649
649
shape = shape ,
650
650
dtype = dtype ,
651
651
chunk_shape = chunk_shape ,
@@ -684,11 +684,11 @@ async def test_group_members_async(store: LocalStore | MemoryStore):
684
684
GroupMetadata (),
685
685
store_path = StorePath (store = store , path = "root" ),
686
686
)
687
- a0 = await group .create_array ("a0" , (1 ,))
687
+ a0 = await group .create_array ("a0" , shape = (1 ,))
688
688
g0 = await group .create_group ("g0" )
689
- a1 = await g0 .create_array ("a1" , (1 ,))
689
+ a1 = await g0 .create_array ("a1" , shape = (1 ,))
690
690
g1 = await g0 .create_group ("g1" )
691
- a2 = await g1 .create_array ("a2" , (1 ,))
691
+ a2 = await g1 .create_array ("a2" , shape = (1 ,))
692
692
g2 = await g1 .create_group ("g2" )
693
693
694
694
# immediate children
0 commit comments