Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Updated comments in dataset_loader.py
  • Loading branch information
agoodm committed Aug 1, 2016
1 parent b2f0ad4 commit 1e0763865d0111f31444119485bfc43bdcf8b096
Showing 1 changed file with 10 additions and 10 deletions.
@@ -70,9 +70,9 @@ def __init__(self, *loader_opts):
Evaluation System Database
* ``'dap'`` - Download the dataset from an OPeNDAP URL
Users who wish to download datasets from loaders not described above
may define their own custom dataset loader function and incorporate it
as follows:
Users who wish to load datasets from loaders not described above may
define their own custom dataset loader function and incorporate it as
follows:
>>> loader.add_source_loader('my_loader_name', my_loader_func)
:param loader_opts: Dictionaries containing the each dataset loader
@@ -85,7 +85,7 @@ def __init__(self, *loader_opts):
:raises KeyError: If an invalid argument is passed to a data source
loader function.
'''
# Reference dataset config
# dataset loader config
self.set_loader_opts(*loader_opts)

# Default loaders
@@ -101,20 +101,20 @@ def add_source_loader(self, loader_name, loader_func):
'''
Add a custom source loader.
:param source_name: The name of the data source.
:type source_name: :mod:`string`
:param loader_name: The name of the data source.
:type loader_name: :mod:`string`
:param loader_func: Reference to a custom defined function. This should
return an OCW Dataset object.
return an OCW Dataset object, and have an origin which satisfies
origin['source'] == loader_name.
:type loader_func: :class:`callable`
'''
self._source_loaders[loader_name] = loader_func

def add_loader_opts(self, *loader_opts):
'''
A convenient means of adding loader options for each dataset to the
loader. If 'loader_name' is not entered as a keyword argument, then
'local' is used by default.
loader.
:param loader_opts: Dictionaries containing the each dataset loader
configuration, representing the keyword arguments of
@@ -150,7 +150,7 @@ def load_datasets(self):
# prevent duplicates.
self.datasets = []

# Load the target datasets
# Load the datasets
for loader_opt in self._config:
output = self._load(**loader_opt)

0 comments on commit 1e07638

Please sign in to comment.