-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuring open_dataset via backend instances #8520
base: main
Are you sure you want to change the base?
Conversation
+1 for the concept! |
I actually wondered about this when I did the |
Seems like there is support for this :) Another related proposal: we could remove the |
These are encode/decode options. I think they are mostly conceptually distinct from See issue about an API for encoding/decoding options. |
Ok, I was simply taking all options that the current backend had and moved them. Maybe a good idea to split these up in this PR and move only backends options to the init and leave the encoding options still in the open_dataset method. |
Yes. I think increasing discoverability of what goes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@headtr1ck I'm trying to add my 2cents for the h5netcdf backend.
Yes, from my perspective h5netcdf backend should be in line with netcdf4 backend (wrt autoclose
and mode
) as it uses BaseNetCDF4Array
and other netcdf4-machinery under the hood consuming those options.
I've added a comment inline for the decode_vlen_strings
option.
Can anyone help with the pydap options (see description)? |
I think I will stop here and do additional work in a future PR, or probably collect further ideas first in an issue to discuss it properly. |
+1 ! |
Support passing instances of
BackendEntryPoints
as theengine
argument.Closes #8447
Then instead of passing a long list of options to the
open_dataset
method directly, you can also configure the entrypoint in the constructor and pass it as the engine.It would look something like this:
While this is actually even more lines of code, the main advantage is to have better discoverability of the options.
TODO:
output_grid
seems to be always set toTrue
? is this intentional, why not remove it instead?> I still had pydap version 3.2, in 3.4 they exist...verify
anduser_charset
are non-existent in pydap?Adapt pynio backend> Won't adapt because deprecatedlock=True
is allowed > Not allowed, otherwise scipy backend breakslock=True
instead ofNone
? Maybe a later PR?XXXBackendEntrypoint
>XXXBackend
?The> Actually it is used inautoclose
argument seems to do nothing?BaseNetCDF4Array
, all goodMove> Its not really a decoder either. Not sure, for now leave it in the init...group
to open_dataset instead of backend option?_resolve_decoders_kwargs
, this function has a lot of implicit assumtions? Maybe removeopen_dataset_parameters
alltogether?open_dataset
now has**kwargs
to support backwards compatibility. Probably we should raise if unsupported stuff is added (i.e. typos) otherwise this could be confusing? (i.e. see test in zarr that checks for deprecatedauto_chunk
)