improve/fix xr splitter#688
Merged
Merged
Conversation
…require the splitting to form a hypercube
…ict(s) with splitting keys
…s and a list of dicts with splitting keys, even if their length is 1; test added
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #688 +/- ##
========================================
Coverage 91.01% 91.01%
========================================
Files 162 162
Lines 12385 12391 +6
Branches 609 609
========================================
+ Hits 11272 11278 +6
Misses 932 932
Partials 181 181 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
@pawel-wolff, thank you very much for this fix and improvement in the Xarray engine. I fully agree with your decision to change the return type when |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
xr_engine splitter improved/fixed in case "split_dims" contains multiple keys
If to_xarray converter gets "split_dims" keyword, a slight change of behaviour is introduced: it returns a tuple with:
Moreover, the two above are always lists, even if they are of length 1 (for consistency of the behaviour).
TBD if we really want to introduce this new behaviour since the values of the splitting keys can be obtained via using "ensure_dims" keyword of to_xarray.
A test and a corresponding mid-size test dataset was added.