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
Add columns_with_iterables
parameter to esm_datastore
#589
Conversation
for more information, see https://pre-commit.ci
columns_with_iterables
parameter to esm_datastore
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.
I like this approach, especially with the error catching here. Would you be willing to add an example as well? So the docs reflect these new changes?
Also a test here would be helpful |
Thanks @mgrover1. Tests and docs added. Note, I had to pin |
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.
Just a few minor changes - I appreciate the contribution @dougiesquire !! Great work!
docs/source/how-to/use-catalogs-with-assets-containing-multiple-variables.md
Outdated
Show resolved
Hide resolved
docs/source/how-to/use-catalogs-with-assets-containing-multiple-variables.md
Outdated
Show resolved
Hide resolved
docs/source/how-to/use-catalogs-with-assets-containing-multiple-variables.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Max Grover <mgroverwx@gmail.com>
Co-authored-by: Max Grover <mgroverwx@gmail.com>
Co-authored-by: Max Grover <mgroverwx@gmail.com>
thank you for this addition, @dougiesquire & @mgrover1! |
Should this info be stored in the JSON instead? It's a property of the catalog, so the information can be specified at write-time instead of at read-time. |
i'm definitely in favor of supporting this when it's defined in the JSON and adding it to the spec: https://github.com/intake/intake-esm/blob/main/docs/source/reference/esm-catalog-spec.md |
Agreed! I think allowing both here makes sense. |
This PR adds an optional
columns_with_iterables
parameter to theintake_esm.esm_datastore
API that specifies the columns to convert withast.literal_eval
. This enables intake yaml descriptions of intake-esm catalogs with multi-variable assets that work by default. See #587 for context/motivation.Note, I also explored using intake dataset transforms, but I don't think this provides quite the functionality we need.
Fixes #587
Checklist