You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose a public interface for CF encoding/decoding functions #155
@shoyer - I know we've made some steps towards addressing some of this issue (e.g. #1752, #1803). What do you think it would take to make that the coding module public API?
I think the eventual interface we want is something like this:
CF decoding in open_dataset is controlled by a coders argument, which takes a list of coders to apply in order.
CF encoding in to_netcdf is also controlled by a coders argument, which takes a list of coders to apply in reversed order.
Helper functions (get_coders()?) make it easy to construct the default coders, e.g., with boolean options for disabling particular coders.
To complete this, we'll need to get all CF encoding/decoding happening in Coder classes. VariableCoder might not suffice -- we also need a way to indicate transformations of a full dataset (e.g., for coding/decoding coordinates).
Eventually, it should be possible to read a dataset without any CF decoding (e.g., by setting coders=[]).
Can these coders just be new zarr codecs? Exposing xarray's decoding logic in a way that follows that interface would allow for zarr to become a "universal reader" - see zarr-developers/zarr-specs#303.
Activity
stale commentedon Feb 3, 2019
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity
If this issue remains relevant, please comment here or remove the
stalelabel; otherwise it will be marked as closed automaticallyjhamman commentedon Feb 4, 2019
@shoyer - I know we've made some steps towards addressing some of this issue (e.g. #1752, #1803). What do you think it would take to make that the coding module public API?
shoyer commentedon Feb 4, 2019
I think the eventual interface we want is something like this:
open_datasetis controlled by acodersargument, which takes a list of coders to apply in order.to_netcdfis also controlled by acodersargument, which takes a list of coders to apply in reversed order.get_coders()?) make it easy to construct the default coders, e.g., with boolean options for disabling particular coders.To complete this, we'll need to get all CF encoding/decoding happening in Coder classes.
VariableCodermight not suffice -- we also need a way to indicate transformations of a full dataset (e.g., for coding/decoding coordinates).Eventually, it should be possible to read a dataset without any CF decoding (e.g., by setting
coders=[]).TomNicholas commentedon Jul 26, 2024
Can these
codersjust be new zarr codecs? Exposing xarray's decoding logic in a way that follows that interface would allow for zarr to become a "universal reader" - see zarr-developers/zarr-specs#303.