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

fix: Skip previous encoding workaround for fixed xarray versions #401

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

coroa
Copy link
Member

@coroa coroa commented Nov 1, 2024

Follow up to a workaround introduced by @euronion in #236 for an encoding issue in xarray (pydata/xarray#7691), which was fixed by (pydata/xarray#8713) and eventually included xarray v2024.03.0 (https://github.com/pydata/xarray/releases/tag/v2024.03.0).

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • Newly introduced dependencies are added to environment.yaml, environment_docs.yaml and setup.py (if applicable).
  • A note for the release notes doc/release_notes.rst of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

see reported issue pydata/xarray#7691 and pr
pydata/xarray#8713 which was included into xarray v2024.03.0
@coroa coroa requested a review from euronion November 1, 2024 15:30
@lkstrp
Copy link
Member

lkstrp commented Nov 1, 2024

We could also just pin xarray now

@coroa
Copy link
Member Author

coroa commented Nov 1, 2024

We could also just pin xarray now

I guess with all the changes xarray is undergoing, having a half-year old version as lower bound is quite acceptable, true.

@euronion
Copy link
Collaborator

euronion commented Nov 2, 2024

Thanks for the cleanup. I'm also in favour of restricting the xarray version. Btw. did you test whether the fix in xarray actually worked? I never got to testing it...

@coroa
Copy link
Member Author

coroa commented Nov 9, 2024

Thanks for the cleanup. I'm also in favour of restricting the xarray version. Btw. did you test whether the fix in xarray actually worked? I never got to testing it...

The dataarrays we receive from CDS has in xarray an encoding of float32 now. As far as i understand that means the fix is working.

@coroa
Copy link
Member Author

coroa commented Nov 9, 2024

Ok, i replaced the implementation by a new version pin.

@lkstrp lkstrp merged commit 481f3af into PyPSA:master Nov 11, 2024
18 of 19 checks passed
@coroa coroa deleted the make-fixed-encoding-bug-optional branch November 11, 2024 08:27
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