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

Error check and dump metadata function #3623

Merged
merged 5 commits into from
Jun 17, 2024
Merged

Error check and dump metadata function #3623

merged 5 commits into from
Jun 17, 2024

Conversation

ifranda
Copy link
Collaborator

@ifranda ifranda commented Jun 12, 2024

I thought I'd open a small PR to test run making changes to the Python api. I've made two changes:

  1. When RGB colors are converted to HSV, make a check to verify the list is of length 3. I think this stops the kernel from crashing when using incorrect inputs with SetColorRGBList
  2. Added a DumpVarMetadata function for datasets. Some of the examples printed out the metadata manually, and I thought it would be nice to have it integrated into the package.

I've tested it out and I think it's working as intended, but let me know if there's anything else I should watch out for!

@NihanthCW
Copy link
Collaborator

Great! You can assign Stas as a reviewer and discuss any questions tomorrow.

@NihanthCW NihanthCW requested a review from StasJ June 13, 2024 05:55
Copy link
Collaborator

@StasJ StasJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! I would suggest implementing DumpVarMetadata as __str__ and include dimensions and coordinates, similar to Xarray.

@ifranda
Copy link
Collaborator Author

ifranda commented Jun 13, 2024

Just made the change! We can definitely talk more about what's being returned here if we have other ideas.

Copy link
Collaborator

@StasJ StasJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@ifranda ifranda linked an issue Jun 14, 2024 that may be closed by this pull request
@ifranda ifranda merged commit ea0692c into NCAR:main Jun 17, 2024
1 check passed
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.

Incorrect inputs to SetColorRGBList crashes kernel
3 participants