Alex Goodman created CLIMATE-837: ------------------------------------ Summary: Make Abstract Base Classes for dataset loaders. Key: CLIMATE-837 URL: https://issues.apache.org/jira/browse/CLIMATE-837 Project: Apache Open Climate Workbench Issue Type: Improvement Components: data sources Affects Versions: 1.1.0 Reporter: Alex Goodman Assignee: Huikyo Lee Fix For: 1.2.0
Now that the {{DatasetLoader}} class has made it possible for users to easily handle loading multiple datasets from different sources, [~huikyole] has suggested that we add another layer of abstraction one level down. Specifically, this pertains to each of the loader functions for each different data source (eg, ESGF, OPeNDAP, local, etc). In order to better standardize our handling of dataset loaders, we instead propose creating abstract base classes for the dataset loaders, as we have done with our metrics. For example, {code} class GenericLoader: def load(self, **kwargs): # Handle loading {code} Although the function signatures of each of the source loaders are very different, they fundamentally either output a single or list of OCW Dataset objects, and may take a single or list of file locations. This would would be the basis for defining the abstract base classes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)