-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensemble summary provider #721
Ensemble summary provider #721
Conversation
…v_file() + misc refactoring
…rt of per-real arrow files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive work @sigurdp! 👏🚀
This is very much worth a changelog entry (add that before merge?) 🍾 Other than that I don't have much to comment on from my point of view (there are some dev_*.py
files and commented out code sections you want to keep since they are in the last commit?).
Changelog - check. The |
Co-authored-by: Håvard Bjerke <[email protected]>
Implements data providers for accessing ensemble summary data through a unified interface. Supports optional lazy resampling/interpolation depending on data input format .
Access to summary data for an ensemble is made available through the
EnsembleSummaryProvider
interface, implemented as an abstract class in Python.Behind the scenes there is two different concrete implementations of the
EnsembleSummaryProvider
interface:ProviderImplArrowLazy
- supports lazy/on demand resampling (only used when input data format in.arrow
files)ProviderImplArrowPresampled
- works similar to our current scheme where smry data is either used directly or is sampled at provider creation time.Currently, all instances of
EnsembleSummaryProvider
should be created using theEnsembleSummaryProviderFactory
singleton factory class, obtainable throughEnsembleSummaryProviderFactory.instance()
. There is currently four factory methods available for creatingEnsembleSummaryProvider
instances:EnsembleSummaryProviderFactory.create_from_ensemble_csv_file()
EnsembleSummaryProviderFactory.create_from_per_realization_csv_file()
EnsembleSummaryProviderFactory.create_from_arrow_unsmry_lazy()
EnsembleSummaryProviderFactory.create_from_arrow_unsmry_presampled()
The factory methods mentioned above will create concrete data provider instances based on the input parameters specified. The two latter methods accept the same raw data input, but will create and return different concrete implementations of the
EnsembleSummaryProvider
interface.Contributor checklist
CHANGELOG.md
, and added it if should be communicated there.