intake / intake-xarray

Intake plugin for xarray
https://intake-xarray.readthedocs.io/
BSD 2-Clause "Simplified" License
74 stars 36 forks source link

Allow netcdf4 engine in opendap driver #91

Closed larsbuntemeyer closed 3 years ago

larsbuntemeyer commented 3 years ago

draft pull request for https://github.com/intake/intake-xarray/issues/90

martindurant commented 3 years ago

I am fine with this kind of thing. Do you think it can be tested?

larsbuntemeyer commented 3 years ago

thx for the hint, should there be an exception test if opendap is used with netcdf4 engine and auth sessions?

martindurant commented 3 years ago

We should definitely raise a meaningful exception for the combinations that don't work, rather than letting it fail later.

martindurant commented 3 years ago

Everything looks good here.

Running again with the new CI setup.

martindurant commented 3 years ago

should there be an exception test if opendap is used with netcdf4 engine and auth sessions

I leave this up to you. What happens right now in this case?

larsbuntemeyer commented 3 years ago

Ok, now the instantiation is allowed, but it raises a ValueError, e.g.

ValueError: Opendap session requires 'pydap' engine.

at discovery time. This is similar behaviour to the case if an invalid session identifier is selected. There is also a test now that will check this behaviour.

larsbuntemeyer commented 3 years ago

thx!