Feature/high level object#919
Merged
sandorkertesz merged 13 commits intorelease/1.0.0rc0from Mar 10, 2026
Merged
Conversation
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
from_source()andform_object()now return a Data (high-level) object with the following API:Data
The Data object is polymorphic. See the
src/earthkit/data/data.Features
describe()method that is yet to be properly implementedconcat()andto_target(). Inconcat()mixing Data and non-Data objects (e.g. fieldlists) is not allowed.Sources
Sources should implement the
to_data_object()method to return an appropriate Data object. If it is not implemented a DefaultSourceData is returned. A default was added to make the Source plugins (if there is any) work. This might be reviewed and force each source to implementto_data_object().The File source delegates the
to_data_object()call to the underlying Reader object.from_source()now callsform_source_internally(), which still returns a Source. All existing internal calls toform_source()was replaced withform_source_internally().Readers
Readers now must implement a
to_data_object()method. They must also implement_encode_default().Encoders
The encoders were extended to almost all the types the Readers can handle. It is now ensured that in calls like this:
the files are copied with a simple file copy to the target location without involving any encdoding/parsing.
FeatureList
FeatureList is a new object, similar to a FieldList, but it is an iterable of "features", where a "feature" can be anything. Used for list-like data that cannot be represented as Fields. Right now the following data types can be converted to a FeatureList (with calling
to_featurelist()on the Data object):Still work in progress, but BUFR has a complete implementation.
Contributor Declaration
By opening this pull request, I affirm the following: