Skip to content

fix py36 xarray master build #200

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

Merged
merged 1 commit into from
Apr 14, 2020
Merged

Conversation

timothyas
Copy link
Member

This (seems to) fix the current bug with the python 3.6, xarray master build. It seems that the newest version of xarray.combine_by_coords added the option combine_attrs, allowing the user to specify how to handle attributes while combining multiple datasets. The default is no_conflicts, which in this case causes a problem with the history attribute since each dataset corresponds to an iteration (or None for the grid), each of which is different and shows up in this attribute as "created by calling open_mdsdataset(.....)"

It seems that the old default was to simply drop attributes, so that's what I'm setting the option to for a first pass. We could also just drop the attributes before calling xr.combine_by_coords, and remove the need for testing.

@codecov-io
Copy link

codecov-io commented Apr 14, 2020

Codecov Report

Merging #200 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
+ Coverage   88.07%   88.09%   +0.01%     
==========================================
  Files          12       12              
  Lines        1644     1646       +2     
  Branches      337      338       +1     
==========================================
+ Hits         1448     1450       +2     
  Misses        158      158              
  Partials       38       38              
Impacted Files Coverage Δ
xmitgcm/mds_store.py 92.76% <100.00%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fb9cc2...83c8741. Read the comment docs.

@rabernat
Copy link
Member

Good catch Tim! This was added quite recently in pydata/xarray#3877.

Fortunately our CI is testing against xarray master from github, which is how we caught the incompatibility. That's how it's supposed to work!

@rabernat rabernat merged commit a3db4d6 into MITgcm:master Apr 14, 2020
@timothyas timothyas deleted the xr_master_debug branch April 14, 2020 15:14
fraserwg pushed a commit to fraserwg/xmitgcm that referenced this pull request Nov 23, 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