Fix/grid consistency check#1003
Open
pawel-wolff wants to merge 3 commits into
Open
Conversation
…ields, detailed diagnosis message added into ValueError Some code cleaning and refactoring: the module xr_engine.splitter removed and pertinent logic incorporated into xr_engine.builder.SplitDatasetBuilder
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1003 +/- ##
===========================================
+ Coverage 81.51% 81.54% +0.02%
===========================================
Files 236 236
Lines 15472 15493 +21
Branches 756 756
===========================================
+ Hits 12612 12633 +21
Misses 2634 2634
Partials 226 226 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Description
This PR fixes the issue #1000.
The proposed solution enforces the grid consistency check across fields from which
xr_engineis trying to build anxarray.Datasetobject. The grid check is based onField.geography.unique_grid_id().Additionally, the following related changes have been made:
src/earthkit/data/core/field.py:Field.from_components(): if no geography is given butshape_hintis known (fromvaluesordata), anEmptryGeography(shape_hint)object is attached to a constructed field rather than a bareEmptyGeography(). This allows both:EmptyGeography()instances are all distinct), seeIndexFieldListBase._has_shared_geography.list-of-dictswith values and with no geography to be successfully converted into anxarray.Dataset; see, for example, this testearthkit-data/tests/xr_engine/test_xr_engine_lod.py
Line 172 in 84aa271
Contributor Declaration
By opening this pull request, I affirm the following: