-
Notifications
You must be signed in to change notification settings - Fork 10
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
[asdf/xarray.DataSet|DataArray] fix serialization of attributes #384
[asdf/xarray.DataSet|DataArray] fix serialization of attributes #384
Conversation
Codecov Report
@@ Coverage Diff @@
## master #384 +/- ##
==========================================
- Coverage 97.44% 97.43% -0.01%
==========================================
Files 86 86
Lines 5196 5183 -13
==========================================
- Hits 5063 5050 -13
Misses 133 133
Continue to review full report at Codecov.
|
Funnily the asdf tests pass on Python-3.9, so I guess the dataclassses.field(defaultfactory=dict) thing behaves differently on 3.8... |
Ah this is the schema tests failing. Sry. So do I need to adopt the schema as well, indicating the new optional "attrs" field should be there? |
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 for the cleanups. Really funny to see all the bad lines of code that I wrote when I started with Python 😄
Co-authored-by: vhirtham <volker.hirthammer@gmail.com>
Changes
The wrapping of
Variables
inside theDataSet
serialization did not contain theattrs
property. Additionally, thecoordinates
of a
DataArray
can also enclose attributes, these were also not being serialized.Refactored some for loops in favor of list comprehensions.
Related Issues
Closes #349
Checks