Add lazy loading option for the FDB source#677
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #677 +/- ##
===========================================
- Coverage 91.01% 90.82% -0.19%
===========================================
Files 162 163 +1
Lines 12391 12431 +40
Branches 609 609
===========================================
+ Hits 11278 11291 +13
- Misses 932 959 +27
Partials 181 181 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3 tasks
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.
This PR implements lazy loading for GRIB data read from FDB. The idea is that when
lazy=Trueis used:from_sourcedoes not execute the retrieval but returns a Virtual FieldList. This involves the following steps:pyfdb.list()Using any metadata queries on the Virtual Fieldlist/Fields does not involve any data retrieval, but try to use the requests for it. For metadata keys not present in the request the metadata from the reference field is used.
Any calls requiring the data values in a field trigger the actual retrieval and the resulting GRIB field will be stored in memory for each virtual field.
Notes
pyfdb.list()