Skip to content

Draft approach to deal with test failures#255

Merged
tennlee merged 5 commits intodevelopfrom
possible_fix
Apr 28, 2026
Merged

Draft approach to deal with test failures#255
tennlee merged 5 commits intodevelopfrom
possible_fix

Conversation

@tennlee
Copy link
Copy Markdown
Collaborator

@tennlee tennlee commented Apr 24, 2026

Not convinced that this fix is universal, or only works on datasets. I am guessing the original code is trying to make a copy, but in a more polymorphic way rather than assume the class of the object. However, maybe using the python copy.copy library would be suitable, or maybe a type-aware if statement to use an xarray-specific approach for data sets and fall back to the current code otherwise. But the tests pass, which is good.

AI Usage Summary: nil AI was used

@tennlee tennlee requested a review from edoyango April 24, 2026 04:04
Copy link
Copy Markdown
Collaborator

@edoyango edoyango left a comment

Choose a reason for hiding this comment

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

using the .copy() method is probably fine imo since the methods are expecting DataArray, Dataset, ndarry; and it's a shallow copy (which what type(x)(x) was doing anyway).

Comment thread packages/pipeline/tests/operations/xarray/test_xarray_reshape.py Outdated
@tennlee
Copy link
Copy Markdown
Collaborator Author

tennlee commented Apr 24, 2026

Great. If a simple .copy seems reasonable, I'll tidy this up and get it merged. Thanks for the quick feedback!

@tennlee tennlee merged commit 8b1802d into develop Apr 28, 2026
12 checks passed
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.

2 participants