Skip to content
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

ENH: Add enum support #60

Merged
merged 2 commits into from
Dec 12, 2023
Merged

Conversation

bzah
Copy link
Collaborator

@bzah bzah commented Dec 12, 2023

Thanks for submitting a PR, your contribution is really appreciated!

Here's a quick checklist that should be present in PRs (you can delete this text from the final description, this is just a guideline):

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.

[summarize your pull request here]

Changes

  • Make it possible to parse EnumTypeDef and turn the enums into CF flag_values and flag_meanings.
  • Also add support for scalar variable (when shape is empty)

References

I. For Enum type conversion: from common_data_model_overview

There are 3 enum types: enum1, enum2, and enum4, corresponding to storing the integer as a byte, short, or int.

II. For scalar variable: from annotated_ncml_schema

The shape attribute lists the names of the dimensions the variable depends on. For a scalar variable, the list will be empty.

@huard
Copy link
Collaborator

huard commented Dec 12, 2023

All good, could you add a note in the CHANGELOG, under a new 0.4 release ?

@bzah
Copy link
Collaborator Author

bzah commented Dec 12, 2023

All good, could you add a note in the CHANGELOG, under a new 0.4 release ?

Oops I did it and forgot to push the commit

@huard huard merged commit 12df2df into xarray-contrib:main Dec 12, 2023
6 checks passed
@bzah bzah deleted the enh/add_enum_support branch December 12, 2023 17:03
@bzah bzah mentioned this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants