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

BUG: fix + test open_mfdataset fails on variable attributes with list… #3181

Merged
merged 11 commits into from Aug 4, 2019

Conversation

HasanAhmadQ7
Copy link
Contributor

… type

… type

Using open_mfdataset on a series of netcdf files having variable attributes with type list will fail with the following exception, when these attributes have different values from one file to another:

solves: pydata#3034
@codecov
Copy link

codecov bot commented Aug 3, 2019

Codecov Report

Merging #3181 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3181      +/-   ##
==========================================
- Coverage    95.7%   95.69%   -0.01%     
==========================================
  Files          63       63              
  Lines       12839    12848       +9     
==========================================
+ Hits        12287    12295       +8     
- Misses        552      553       +1

Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

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

Thanks @HasanAhmadQ7 !
I added a small tweak; then ready to merge

xarray/core/utils.py Outdated Show resolved Hide resolved
return False
else:
for i in range(len(first)):
equiv = equiv and equivalent(first[i], second[i])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
equiv = equiv and equivalent(first[i], second[i])
equiv = equiv and equivalent(f, s)

Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
@pep8speaks
Copy link

pep8speaks commented Aug 3, 2019

Hello @HasanAhmadQ7! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-08-04 11:18:56 UTC

Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
HasanAhmadQ7 and others added 5 commits August 4, 2019 08:48
… type

Using open_mfdataset on a series of netcdf files having variable attributes with type list will fail with the following exception, when these attributes have different values from one file to another:

solves: pydata#3034
Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
Co-Authored-By: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
@max-sixty
Copy link
Collaborator

Thanks @HasanAhmadQ7 !

@max-sixty max-sixty merged commit 8931c69 into pydata:master Aug 4, 2019
dcherian added a commit to yohai/xarray that referenced this pull request Aug 7, 2019
* master:
  pyupgrade one-off run (pydata#3190)
  mfdataset, concat now support the 'join' kwarg. (pydata#3102)
  reduce the size of example dataset in dask docs (pydata#3187)
  add climpred to related-projects (pydata#3188)
  bump rasterio to 1.0.24 in doc building environment (pydata#3186)
  More annotations (pydata#3177)
  Support for __array_function__ implementers (sparse arrays) [WIP] (pydata#3117)
  Internal clean-up of isnull() to avoid relying on pandas (pydata#3132)
  Call darray.compute() in plot() (pydata#3183)
  BUG: fix + test open_mfdataset fails on variable attributes with list… (pydata#3181)
dcherian added a commit to dcherian/xarray that referenced this pull request Aug 8, 2019
* master:
  pyupgrade one-off run (pydata#3190)
  mfdataset, concat now support the 'join' kwarg. (pydata#3102)
  reduce the size of example dataset in dask docs (pydata#3187)
  add climpred to related-projects (pydata#3188)
  bump rasterio to 1.0.24 in doc building environment (pydata#3186)
  More annotations (pydata#3177)
  Support for __array_function__ implementers (sparse arrays) [WIP] (pydata#3117)
  Internal clean-up of isnull() to avoid relying on pandas (pydata#3132)
  Call darray.compute() in plot() (pydata#3183)
  BUG: fix + test open_mfdataset fails on variable attributes with list… (pydata#3181)
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.

open_mfdataset fails on variable attributes with 'list' type
3 participants