You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by le...@apache.org on 2018/01/17 02:08:35 UTC

[1/4] climate git commit: CLIMATE-917 Bocumentation build error with Python3

Repository: climate
Updated Branches:
  refs/heads/master e63c5f284 -> 91c006555


CLIMATE-917 Bocumentation build error with Python3


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

Branch: refs/heads/master
Commit: bc1cd24fe933f9def21228d8b3f4fbc3a8376b6a
Parents: 4cf79f3
Author: Michael Anderson <mi...@Michaels-iMac.local>
Authored: Thu Jan 4 21:44:20 2018 -0500
Committer: Michael Anderson <mi...@Michaels-iMac.local>
Committed: Thu Jan 4 21:44:20 2018 -0500

----------------------------------------------------------------------
 docs/source/conf.py             |  4 ++++
 ocw-ui/backend/rcmed_helpers.py |  4 ++--
 ocw/dataset.py                  |  3 ++-
 ocw/dataset_loader.py           | 17 ++++++++---------
 ocw/utils.py                    | 16 ++++++++--------
 5 files changed, 24 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/bc1cd24f/docs/source/conf.py
----------------------------------------------------------------------
diff --git a/docs/source/conf.py b/docs/source/conf.py
index f9eaafc..b0b511c 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -33,11 +33,15 @@ sys.path.insert(0, os.path.abspath('../../ocw-config-runner'))
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+
+# Note that 'sphinxcontrib.autohttp.bottle' is currently broken in Sphinx > 1.56
+# Remove from the extension list if documentation fails on Sphinx hard failure.
 extensions = [
     'sphinx.ext.autodoc',
     'sphinx.ext.intersphinx',
     'sphinx.ext.ifconfig',
     'sphinxcontrib.httpdomain',
+    'sphinxcontrib.autohttp.bottle'
 ]
 
 # Add any paths that contain templates here, relative to this directory.

http://git-wip-us.apache.org/repos/asf/climate/blob/bc1cd24f/ocw-ui/backend/rcmed_helpers.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/rcmed_helpers.py b/ocw-ui/backend/rcmed_helpers.py
index 32e1af8..0c584aa 100644
--- a/ocw-ui/backend/rcmed_helpers.py
+++ b/ocw-ui/backend/rcmed_helpers.py
@@ -55,7 +55,7 @@ def get_dataset_parameters():
 
     **Example Call Format**
 
-    .. sourcecode:: javascript
+    .. sourcecode:: text
 
         /parameters/?dataset=<dataset's short name>
 
@@ -121,7 +121,7 @@ def get_parameters_bounds():
 
     **Example Call Format**
 
-    .. sourcecode:: javascript
+    .. sourcecode:: text
 
         /parameters/bounds/
 

http://git-wip-us.apache.org/repos/asf/climate/blob/bc1cd24f/ocw/dataset.py
----------------------------------------------------------------------
diff --git a/ocw/dataset.py b/ocw/dataset.py
index 196913a..0a0e1a6 100644
--- a/ocw/dataset.py
+++ b/ocw/dataset.py
@@ -117,6 +117,7 @@ class Dataset:
 
            If self.lats and self.lons are from curvilinear coordinates,
            the output resolutions are approximate values.
+
         :returns: The Dataset's latitudinal and longitudinal spatial resolution
             as a tuple of the form (lat_resolution, lon_resolution).
         :rtype: (:class:`float`, :class:`float`)
@@ -264,7 +265,7 @@ class Bounds(object):
                  start=None, end=None):
         '''Default Bounds constructor
         :param boundary_type: The type of spatial subset boundary.
-        :type boundary_type: :mod:`string'
+        :type boundary_type: :mod:`string`
 
 
         :param lat_min: The minimum latitude bound.

http://git-wip-us.apache.org/repos/asf/climate/blob/bc1cd24f/ocw/dataset_loader.py
----------------------------------------------------------------------
diff --git a/ocw/dataset_loader.py b/ocw/dataset_loader.py
index 4b2a925..f84bdc4 100644
--- a/ocw/dataset_loader.py
+++ b/ocw/dataset_loader.py
@@ -33,33 +33,31 @@ class DatasetLoader:
 
         Each keyword argument can be information for a dataset in dictionary
         form. For example:
-        ``
+
         >>> loader_opt1 = {'loader_name': 'rcmed', 'name': 'cru',
                            'dataset_id': 10, 'parameter_id': 34}
         >>> loader_opt2 = {'path': './data/TRMM_v7_3B43_1980-2010.nc,
                            'variable': 'pcp'}
         >>> loader = DatasetLoader(loader_opt1, loader_opt2)
-        ``
 
         Or more conveniently if the loader configuration is defined in a
         yaml file named config_file (see RCMES examples):
-        ``
+
         >>> import yaml
         >>> config = yaml.load(open(config_file))
         >>> obs_loader_config = config['datasets']['reference']
         >>> loader = DatasetLoader(*obs_loader_config)
-        ``
 
         As shown in the first example, the dictionary for each argument should
         contain a loader name and parameters specific to the particular loader.
         Once the configuration is entered, the datasets may be loaded using:
-        ``
+
         >>> loader.load_datasets()
         >>> obs_datasets = loader.datasets
-        ``
 
         Additionally, each dataset must have a ``loader_name`` keyword. This may
         be one of the following:
+
         * ``'local'`` - One or multiple dataset files in a local directory
         * ``'local_split'`` - A single dataset split accross multiple files in a
                               local directory
@@ -74,6 +72,7 @@ class DatasetLoader:
         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
@@ -84,7 +83,7 @@ class DatasetLoader:
         :type loader_opts: :class:`dict`
 
         :raises KeyError: If an invalid argument is passed to a data source
-        loader function.
+                            loader function.
         '''
         # dataset loader config
         self.set_loader_opts(*loader_opts)
@@ -115,8 +114,8 @@ class DatasetLoader:
         :type loader_name: :mod:`string`
 
         :param loader_func: Reference to a custom defined function. This should
-        return an OCW Dataset object, and have an origin which satisfies
-        origin['source'] == loader_name.
+                            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

http://git-wip-us.apache.org/repos/asf/climate/blob/bc1cd24f/ocw/utils.py
----------------------------------------------------------------------
diff --git a/ocw/utils.py b/ocw/utils.py
index c2b62cf..8f2c8c1 100755
--- a/ocw/utils.py
+++ b/ocw/utils.py
@@ -402,7 +402,7 @@ def trim_dataset(dataset):
     ''' Trim datasets such that first and last year of data have all 12 months
 
     :param dataset: Dataset object
-    :type dataset: :class:`dataset.Dataset
+    :type dataset: :class:`dataset.Dataset`
 
     :returns: Slice index for trimmed dataset
     '''
@@ -653,7 +653,7 @@ def _force_unicode(s, encoding='utf-8'):
 def calculate_temporal_trends(dataset):
     ''' Calculate temporal trends in dataset.values
     :param dataset: The dataset from which time values should be extracted.
-    :type dataset: :class:`dataset.Dataset'
+    :type dataset: :class:`dataset.Dataset`
 
     :returns: Arrays of the temporal trend and standard error
     :rtype: :class:`numpy.ma.core.MaskedArray`
@@ -675,13 +675,13 @@ def calculate_temporal_trends(dataset):
 def calculate_ensemble_temporal_trends(timeseries_array, number_of_samples=1000):
     ''' Calculate temporal trends in an ensemble of time series
     :param timeseries_array: Two dimensional array. 1st index: model, 2nd index: time.
-    :type timeseries_array: :class:`numpy.ndarray'
+    :type timeseries_array: :class:`numpy.ndarray`
 
     :param sampling: A list whose elements are one-dimensional numpy arrays
-    :type timeseries_array: :class:`list'
+    :type timeseries_array: :class:`list`
 
     :returns: temporal trend and estimated error from bootstrapping
-    :rtype: :float:`float','float'
+    :rtype: :class:`float`, :class:`float`
     '''
 
     nmodels, nt = timeseries_array.shape
@@ -701,13 +701,13 @@ def calculate_ensemble_temporal_trends(timeseries_array, number_of_samples=1000)
 def calculate_temporal_trend_of_time_series(x,y):
     ''' Calculate least-square trends (a) in y = ax+b and a's standard error
     :param x: time series
-    :type x: :class:`numpy.ndarray'
+    :type x: :class:`numpy.ndarray`
 
     :param x: time series
-    :type x: :class:`numpy.ndarray'
+    :type x: :class:`numpy.ndarray`
 
     :returns: temporal trend and standard error
-    :rtype: :float:`float','float'
+    :rtype: :class:`float`, :class:`float`
     '''
     slope, intercept, r_value, p_value, std_err = stats.linregress(x,y)
     return slope, std_err


[3/4] climate git commit: CIMATE-917 Bocumentation build error with Python3

Posted by le...@apache.org.
CIMATE-917 Bocumentation build error with Python3


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

Branch: refs/heads/master
Commit: 13c6dd6aed9b7cff73cdfa985fe8a561a4759eab
Parents: 64c2a55
Author: Michael Anderson <mi...@Michaels-iMac.local>
Authored: Sun Jan 7 19:37:20 2018 -0500
Committer: Michael Anderson <mi...@Michaels-iMac.local>
Committed: Sun Jan 7 19:37:20 2018 -0500

----------------------------------------------------------------------
 docs/source/conf.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/13c6dd6a/docs/source/conf.py
----------------------------------------------------------------------
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 5e101e9..3afb88b 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -14,7 +14,10 @@
 import sys
 import os
 
-autodoc_mock_imports = ["esgf"]
+# esgf is not currently available for Python 3 and will throw an
+# error when building the documents.
+if sys.version_info[0] >= 3:
+    autodoc_mock_imports = ["esgf"]
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the


[2/4] climate git commit: CIMATE-917 Bocumentation build error with Python3

Posted by le...@apache.org.
CIMATE-917 Bocumentation build error with Python3


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

Branch: refs/heads/master
Commit: 64c2a55f9b53622e46bb524934a870f928c6ae92
Parents: bc1cd24
Author: Michael Anderson <mi...@Michaels-iMac.local>
Authored: Sun Jan 7 19:32:25 2018 -0500
Committer: Michael Anderson <mi...@Michaels-iMac.local>
Committed: Sun Jan 7 19:32:25 2018 -0500

----------------------------------------------------------------------
 docs/source/conf.py | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/64c2a55f/docs/source/conf.py
----------------------------------------------------------------------
diff --git a/docs/source/conf.py b/docs/source/conf.py
index b0b511c..5e101e9 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -14,6 +14,8 @@
 import sys
 import os
 
+autodoc_mock_imports = ["esgf"]
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.


[4/4] climate git commit: Merge branch 'CLIMATE-917' of https://github.com/MichaelArthurAnderson/climate

Posted by le...@apache.org.
Merge branch 'CLIMATE-917' of https://github.com/MichaelArthurAnderson/climate


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

Branch: refs/heads/master
Commit: 91c00655541a05b7af07e6a837e810e6212c8183
Parents: e63c5f2 13c6dd6
Author: Lewis John McGibbney <le...@gmail.com>
Authored: Tue Jan 16 18:08:29 2018 -0800
Committer: Lewis John McGibbney <le...@gmail.com>
Committed: Tue Jan 16 18:08:29 2018 -0800

----------------------------------------------------------------------
 docs/source/conf.py   |  9 +++++++++
 ocw/dataset.py        |  3 ++-
 ocw/dataset_loader.py | 17 ++++++++---------
 ocw/utils.py          | 16 ++++++++--------
 4 files changed, 27 insertions(+), 18 deletions(-)
----------------------------------------------------------------------