-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow user to explicitly disable coordinates attribute #5514
Allow user to explicitly disable coordinates attribute #5514
Conversation
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.
Thanks @ellesmith88 ! This looks very nice.
I have some minor suggestions.
xarray/tests/test_conventions.py
Outdated
|
||
# check coordinate attribute not emitted for 'b' | ||
assert enc["b"].attrs.get("coordinates") == "t" | ||
assert enc["b"].encoding.get("coordinates") is None |
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.
nice tests.
Let's also test for when orig.a.encoding["coordinates"] = None
@dcherian Thanks for the review, I've made those changes |
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.
Thanks @ellesmith88 this looks great to me!
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.
Thank you for your first PR contribution 🎉, @ellesmith88, and welcome to the xarray community!
pre-commit run --all-files
whats-new.rst