Skip to content

Commit 3c76660

Browse files
committed
chore: do not use same_names settings in examples
1 parent a5d84f1 commit 3c76660

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ backend = fsspec.open(
6666
f"blockcache::{s3_uri}",
6767
mode="rb",
6868
s3={"anon": True, "default_block_size": 65536}, # s3 settings
69-
blockcache={"cache_storage": "cache", "same_names": True}, # blockcache settings
69+
blockcache={"cache_storage": "cache"}, # blockcache settings
7070
)
7171
# Create reader from the fsspec file object using a context manager.
7272
# This will automatically close the file when the block is exited.

examples/plot_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
f"blockcache::s3://openmeteo/data_spatial/dwd_icon/2025/09/23/0000Z/2025-09-30T0000.om",
3434
mode="rb",
3535
s3={"anon": True, "default_block_size": 65536},
36-
blockcache={"cache_storage": "cache", "same_names": True},
36+
blockcache={"cache_storage": "cache"},
3737
)
3838
with OmFileReader(backend) as reader:
3939
print("reader.is_group", reader.is_group)

examples/readme_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
f"blockcache::{s3_uri}",
2121
mode="rb",
2222
s3={"anon": True, "default_block_size": 65536}, # s3 settings
23-
blockcache={"cache_storage": "cache", "same_names": True}, # blockcache settings
23+
blockcache={"cache_storage": "cache"}, # blockcache settings
2424
)
2525
# Create reader from the fsspec file object using a context manager.
2626
# This will automatically close the file when the block is exited.

examples/regrid_ecmwf_ifs_hres_gaussian_O1280_to_0.1_degree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
f"blockcache::s3://{ifs_spatial_file}",
2626
mode="rb",
2727
s3={"anon": True, "default_block_size": 65536},
28-
blockcache={"cache_storage": "cache", "same_names": True},
28+
blockcache={"cache_storage": "cache"},
2929
)
3030
with OmFileReader(backend) as reader:
3131
print("reader.is_group", reader.is_group)

examples/spatial_xarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
f"blockcache::s3://{s3_spatial_file}",
2929
mode="rb",
3030
s3={"anon": True, "default_block_size": 65536},
31-
blockcache={"cache_storage": "cache", "same_names": True},
31+
blockcache={"cache_storage": "cache"},
3232
)
3333

3434
ds = xr.open_dataset(backend, engine="om") # type: ignore

tests/test_fsspec.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ def s3_backend_with_cache():
4747
s3_fs = S3FileSystem(anon=True, default_block_size=65536, default_cache_type="none")
4848
from fsspec.implementations.cached import CachingFileSystem
4949

50-
return CachingFileSystem(
51-
fs=s3_fs, cache_check=3600, block_size=65536, cache_storage="cache", check_files=False, same_names=True
52-
)
50+
return CachingFileSystem(fs=s3_fs, cache_check=3600, cache_storage="cache", check_files=False, same_names=False)
5351

5452

5553
@pytest.fixture

0 commit comments

Comments
 (0)