Skip to content

Do not write an empty "coordinates" attribute to a netCDF file#5121

Merged
dcherian merged 4 commits intopydata:masterfrom
bopen:drop_empty_coordinates_attribute
Apr 7, 2021
Merged

Do not write an empty "coordinates" attribute to a netCDF file#5121
dcherian merged 4 commits intopydata:masterfrom
bopen:drop_empty_coordinates_attribute

Conversation

@alexamici
Copy link
Collaborator

@alexamici alexamici commented Apr 6, 2021

  • No issue, trivial cleanup
  • Tests modified to match

The behaviour is not too problematic as CF checkers don't complain about the empty string, but it is aesthetically annoying.

This happens more frequently after #2844 added the auxiliary variable to .coords.

Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

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

Thanks @alexamici

Copy link
Collaborator

@keewis keewis 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 to me. We could change the comparison, but this doesn't really change the readability so it's your choice. I don't know much about the current behavior so I can't comment on changing the test vs. writing a new one.

Co-authored-by: keewis <keewis@users.noreply.github.com>
@dcherian dcherian merged commit e569058 into pydata:master Apr 7, 2021
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.

3 participants