Split the functionality into child classes to make it more explicit where the data is sourced from at the call site. Added the functionality to source data from a URL directly. Note that the data is cached in a temporary file as controlled by the earthkit data cache policy setting. This is becase stream source does not implement the sel method at this time.
https://earthkit-data.readthedocs.io/en/latest/guide/caching.html#cache-policies
Code changes:
data_source.DataSource is now an abstract base class
Refactored FDBDataSource, FileDataSource, PolytopeDataSource that inherit from DataSource
Purpose
Split the functionality into child classes to make it more explicit where the data is sourced from at the call site. Added the functionality to source data from a URL directly. Note that the data is cached in a temporary file as controlled by the earthkit data cache policy setting. This is becase stream source does not implement the
sel
method at this time. https://earthkit-data.readthedocs.io/en/latest/guide/caching.html#cache-policiesCode changes:
data_source.DataSource
is now an abstract base classFDBDataSource
,FileDataSource
,PolytopeDataSource
that inherit fromDataSource
URLDataSource