zarr-developers / VirtualiZarr

Create virtual Zarr stores from archival data files using xarray syntax
https://virtualizarr.readthedocs.io/en/latest/
Apache License 2.0
68 stars 10 forks source link

Pass args and add test #128

Closed abarciauskas-bgse closed 1 month ago

abarciauskas-bgse commented 1 month ago

I noticed that reader_options were not being passed through to read_kerchunk_references_from_file in open_virtual_dataset when I was trying out the library with some files on S3 (e.g. open_virtual_dataset(s3_link, reader_options={'storage_options': aws_creds}) would get a Forbidden error, see https://gist.github.com/abarciauskas-bgse/629702733946b1ec0b008f659dbc3406 for reproducible example).

This PR just adds one line so those args are passed through. I added a test but not sure if that is overkill for such a small change.

TomNicholas commented 1 month ago

This looks great, thanks @abarciauskas-bgse !