@@ -325,7 +325,7 @@ def test_to_xarray_dataset(tmp_path: Path) -> None:
325325 xr_ds = to_xarray_dataset (dataset )
326326
327327 file_path = output_path (tmp_path , f"{ xr_ds .attrs ['name' ]} " , debugging = False )
328- xr_ds .to_zarr (store = file_path , mode = "w" , zarr_format = 2 , compute = False )
328+ xr_ds .to_zarr (store = file_path , mode = "w" , compute = False )
329329
330330
331331def test_seismic_poststack_3d_acceptance_to_xarray_dataset (tmp_path : Path ) -> None :
@@ -335,7 +335,7 @@ def test_seismic_poststack_3d_acceptance_to_xarray_dataset(tmp_path: Path) -> No
335335 xr_ds = to_xarray_dataset (dataset )
336336
337337 file_path = output_path (tmp_path , f"{ xr_ds .attrs ['name' ]} " , debugging = False )
338- xr_ds .to_zarr (store = file_path , mode = "w" , zarr_format = 2 , compute = False )
338+ xr_ds .to_zarr (store = file_path , mode = "w" , compute = False )
339339
340340
341341@pytest .mark .skip (reason = "Bug reproducer for the issue 582" )
@@ -348,12 +348,7 @@ def test_buf_reproducer_dask_to_zarr(tmp_path: Path) -> None:
348348 dtype = np_dtype ([("inline" , "int32" ), ("cdp_x" , "float64" )])
349349 dtype_fill_value = np_zeros ((), dtype = dtype )
350350
351- # Use '_FillValue' instead of 'fill_value'
352- # 'fill_value' is not a valid encoding key in Zarr v2
353- my_attr_encoding = {
354- "_FillValue" : dtype_fill_value ,
355- "chunk_key_encoding" : {"name" : "v2" , "separator" : "/" },
356- }
351+ my_attr_encoding = {"fill_value" : dtype_fill_value }
357352
358353 # Create a dask array using the data type
359354 # Do not specify encoding as the array attribute
@@ -363,7 +358,7 @@ def test_buf_reproducer_dask_to_zarr(tmp_path: Path) -> None:
363358 # Specify encoding per array
364359 encoding = {"myattr" : my_attr_encoding }
365360 file_path = output_path (tmp_path , "to_zarr/zarr_dask" , debugging = False )
366- aa .to_zarr (file_path , mode = "w" , zarr_format = 2 , encoding = encoding , compute = False )
361+ aa .to_zarr (file_path , mode = "w" , encoding = encoding , compute = False )
367362
368363
369364def test_to_zarr_from_zarr_zeros_1 (tmp_path : Path ) -> None :
@@ -375,21 +370,16 @@ def test_to_zarr_from_zarr_zeros_1(tmp_path: Path) -> None:
375370 dtype = np_dtype ([("inline" , "int32" ), ("cdp_x" , "float64" )])
376371 dtype_fill_value = np_zeros ((), dtype = dtype )
377372
378- # Use '_FillValue' instead of 'fill_value'
379- # 'fill_value' is not a valid encoding key in Zarr v2
380- my_attr_encoding = {
381- "_FillValue" : dtype_fill_value ,
382- "chunk_key_encoding" : {"name" : "v2" , "separator" : "/" },
383- }
373+ my_attr_encoding = {"fill_value" : dtype_fill_value }
384374
385375 # Create a zarr array using the data type,
386376 # Specify encoding as the array attribute
387- data = zarr_zeros ((36 , 36 ), dtype = dtype , zarr_format = 2 )
377+ data = zarr_zeros ((36 , 36 ), dtype = dtype )
388378 aa = xr_DataArray (name = "myattr" , data = data )
389379 aa .encoding = my_attr_encoding
390380
391381 file_path = output_path (tmp_path , "to_zarr/zarr_zarr_zerros_1" , debugging = False )
392- aa .to_zarr (file_path , mode = "w" , zarr_format = 2 , compute = False )
382+ aa .to_zarr (file_path , mode = "w" , compute = False )
393383
394384
395385def test_to_zarr_from_zarr_zeros_2 (tmp_path : Path ) -> None :
@@ -401,22 +391,17 @@ def test_to_zarr_from_zarr_zeros_2(tmp_path: Path) -> None:
401391 dtype = np_dtype ([("inline" , "int32" ), ("cdp_x" , "float64" )])
402392 dtype_fill_value = np_zeros ((), dtype = dtype )
403393
404- # Use '_FillValue' instead of 'fill_value'
405- # 'fill_value' is not a valid encoding key in Zarr v2
406- my_attr_encoding = {
407- "_FillValue" : dtype_fill_value ,
408- "chunk_key_encoding" : {"name" : "v2" , "separator" : "/" },
409- }
394+ my_attr_encoding = {"fill_value" : dtype_fill_value }
410395
411396 # Create a zarr array using the data type,
412397 # Do not specify encoding as the array attribute
413- data = zarr_zeros ((36 , 36 ), dtype = dtype , zarr_format = 2 )
398+ data = zarr_zeros ((36 , 36 ), dtype = dtype )
414399 aa = xr_DataArray (name = "myattr" , data = data )
415400
416401 file_path = output_path (tmp_path , "to_zarr/zarr_zarr_zerros_2" , debugging = False )
417402 # Specify encoding per array
418403 encoding = {"myattr" : my_attr_encoding }
419- aa .to_zarr (file_path , mode = "w" , zarr_format = 2 , encoding = encoding , compute = False )
404+ aa .to_zarr (file_path , mode = "w" , encoding = encoding , compute = False )
420405
421406
422407def test_to_zarr_from_np (tmp_path : Path ) -> None :
@@ -425,12 +410,7 @@ def test_to_zarr_from_np(tmp_path: Path) -> None:
425410 dtype = np_dtype ([("inline" , "int32" ), ("cdp_x" , "float64" )])
426411 dtype_fill_value = np_zeros ((), dtype = dtype )
427412
428- # Use '_FillValue' instead of 'fill_value'
429- # 'fill_value' is not a valid encoding key in Zarr v2
430- my_attr_encoding = {
431- "_FillValue" : dtype_fill_value ,
432- "chunk_key_encoding" : {"name" : "v2" , "separator" : "/" },
433- }
413+ my_attr_encoding = {"fill_value" : dtype_fill_value }
434414
435415 # Create a zarr array using the data type
436416 # Do not specify encoding as the array attribute
@@ -440,4 +420,4 @@ def test_to_zarr_from_np(tmp_path: Path) -> None:
440420 file_path = output_path (tmp_path , "to_zarr/zarr_np" , debugging = False )
441421 # Specify encoding per array
442422 encoding = {"myattr" : my_attr_encoding }
443- aa .to_zarr (file_path , mode = "w" , zarr_format = 2 , encoding = encoding , compute = False )
423+ aa .to_zarr (file_path , mode = "w" , encoding = encoding , compute = False )
0 commit comments