@@ -59,34 +59,30 @@ def test_readme_example():
5959 """
6060 Test the example from the README frontpage.
6161
62- Uses ERA5 data from the NSF-NCAR public S3 bucket.
62+ Uses ITS_LIVE velocity data from a public S3 bucket.
6363 Verifies output matches fsspec.
6464 """
6565 import s3fs
6666 from obstore .store import S3Store
67+ from obspec_utils .glob import glob
6768
68- bucket = "nsf-ncar-era5"
69- path = (
70- "e5.oper.an.pl/202501/e5.oper.an.pl.128_060_pv.ll025sc.2025010100_2025010123.nc"
71- )
72-
69+ bucket = "its-live-data"
7370 store = S3Store (
7471 bucket = bucket ,
7572 aws_region = "us-west-2" ,
7673 skip_signature = True ,
7774 )
75+
76+ # Find NetCDF files matching a pattern
77+ files = glob (store , "NSIDC/velocity_image_pair_sample/landsatOLI/v02/N20E080/*.nc" )
78+ path = files [0 ]
79+
7880 fs = s3fs .S3FileSystem (anon = True )
7981
8082 with (
8183 fs .open (f"{ bucket } /{ path } " ) as f ,
82- BlockStoreReader (store , path ) as reader ,
84+ EagerStoreReader (store , path ) as reader ,
8385 xr .open_dataset (f , engine = "h5netcdf" ) as ds_fsspec ,
8486 xr .open_dataset (reader , engine = "h5netcdf" ) as ds_obspec ,
8587 ):
86- # Compare indexes
87- assert list (ds_fsspec .indexes ) == list (ds_obspec .indexes )
88- # Load just one point to verify data access
89- var = list (ds_obspec .data_vars )[0 ]
90- subset_fsspec = ds_fsspec [var ].isel ({d : 0 for d in ds_fsspec [var ].dims })
91- subset_obspec = ds_obspec [var ].isel ({d : 0 for d in ds_obspec [var ].dims })
92- xr .testing .assert_equal (subset_fsspec , subset_obspec )
88+ xr .testing .assert_allclose (ds_fsspec .load (), ds_obspec .load ())
0 commit comments