climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From good...@apache.org
Subject [2/2] climate git commit: Updated comments in dataset_loader.py
Date Mon, 01 Aug 2016 22:00:13 GMT
Updated comments in dataset_loader.py


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/1e076386
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/1e076386
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/1e076386

Branch: refs/heads/master
Commit: 1e0763865d0111f31444119485bfc43bdcf8b096
Parents: b2f0ad4
Author: Alex Goodman <agoodm@users.noreply.github.com>
Authored: Mon Aug 1 14:56:26 2016 -0700
Committer: Alex Goodman <agoodm@users.noreply.github.com>
Committed: Mon Aug 1 14:56:26 2016 -0700

----------------------------------------------------------------------
 ocw/dataset_loader.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/1e076386/ocw/dataset_loader.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_loader.py b/ocw/dataset_loader.py
index 3c8b95f..7c90123 100644
--- a/ocw/dataset_loader.py
+++ b/ocw/dataset_loader.py
@@ -70,9 +70,9 @@ class DatasetLoader:
                         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 @@ class DatasetLoader:
         :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,11 +101,12 @@ class DatasetLoader:
         '''
         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
@@ -113,8 +114,7 @@ class DatasetLoader:
     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 @@ class DatasetLoader:
         # prevent duplicates.
         self.datasets = []
 
-        # Load the target datasets
+        # Load the datasets
         for loader_opt in self._config:
             output = self._load(**loader_opt)
 


Mime
View raw message