stac-utils / xpystac

For extending xarray.open_dataset to accept pystac objects
MIT License
32 stars 2 forks source link

Fix opening STAC Assets with xarray:open_kwargs engine field #18

Closed weiji14 closed 1 year ago

weiji14 commented 1 year ago

Update the kwargs merging logic to have the 'engine' keyword argument from default_kwarg override the one set in the open_kwargs dict. Included a regression unit test that extends the existing simple_zarr test to ensure that the fix for duplicate keys works.

Note that the xarray:open_kwargs field is a part of the xarray-assets STAC extension (in Proposal stage), xref #16

Fixes #17