-
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
fix LCS time handling for xarray>=2023.4.0 #868
Conversation
Codecov Report
@@ Coverage Diff @@
## master #868 +/- ##
=======================================
Coverage 96.51% 96.51%
=======================================
Files 94 94
Lines 6283 6283
=======================================
Hits 6064 6064
Misses 219 219
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Thanks! It'd be good to have a stack trace or failed report inside an issue, since the logs gets deleted after some time. |
The thing with these failures it the error itself is not that important, more the environment and installed packages. But we can paste those here |
It is also strange, that the conda build also installs pandas 1.5.3, but the tests succeed. |
The problem seems to be related to xarray 2023.4.0, which is available on PyPi but not released on conda-forge yet (maybe the error would also arise with pandas 2 but we cant test that against an older working xarray version) |
I have tested this manually with old The new code is more explicit in achieving the desired behavior. However much of the time related code should be reworked soon to reduce the compelxity |
@@ -360,6 +364,7 @@ def _check_and_normalize_orientation(orientation: xr.DataArray) -> xr.DataArray: | |||
orientation, | |||
input_core_dims=[["c"]], | |||
output_core_dims=[["c"]], | |||
keep_attrs=True, |
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.
I am not sure how or if default arguments changed with regards to keeping xarray attributes, however this is what we want
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.
Eventually, we should make these arguments explicit to avoid breaking changes due to upstream default argument changes?
Some time interpolation code seems to break with the new xarray release (seemingly unrelated of pandas major version 1 or 2)
Changes
LocalCoordinateSystem
codekeep_attrs=True
when applyingxarray.apply_ufunc