climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [1/2] git commit: CLIMATE-387 - Update malformed rST in backend docs.
Date Thu, 03 Apr 2014 02:34:42 GMT
Repository: climate
Updated Branches:
  refs/heads/master 82396cf4e -> 0e6517058


CLIMATE-387 - Update malformed rST in backend docs.


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

Branch: refs/heads/master
Commit: eeb354b143ee0c8c487e1bf65d5cae728e84e246
Parents: c9558e0
Author: Michael Joyce <joyce@apache.org>
Authored: Sat Mar 29 22:49:07 2014 -0700
Committer: Michael Joyce <joyce@apache.org>
Committed: Sat Mar 29 22:49:07 2014 -0700

----------------------------------------------------------------------
 ocw-ui/backend/directory_helpers.py             | 28 ++++++++++----------
 .../backend/local_file_metadata_extractors.py   | 24 ++++++++---------
 ocw-ui/backend/processing.py                    | 20 +++++++++++---
 ocw-ui/backend/rcmed_helpers.py                 | 12 ++++-----
 4 files changed, 48 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/eeb354b1/ocw-ui/backend/directory_helpers.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/directory_helpers.py b/ocw-ui/backend/directory_helpers.py
index c7e0d2d..c754cf3 100644
--- a/ocw-ui/backend/directory_helpers.py
+++ b/ocw-ui/backend/directory_helpers.py
@@ -35,9 +35,9 @@ def get_directory_info(dir_path='/'):
 
     :returns: Dictionary containing the directory listing if possible.
 
-    * Example successful JSON return *
+    **Example successful JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'listing': [
@@ -47,9 +47,9 @@ def get_directory_info(dir_path='/'):
             ]
         }
 
-    * Example failure JSON return *
+    **Example failure JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {'listing': []}
     '''
@@ -88,9 +88,9 @@ def get_result_dir_info():
     directories there are formatted and returned as results. If WORK_DIR does
     not exist, an empty listing will be returned (shown as a 'failure below').
 
-    * Successful JSON Response *
+    **Successful JSON Response**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'listing': [
@@ -99,9 +99,9 @@ def get_result_dir_info():
             ]
         }
 
-    * Failure JSON Response *
+    **Failure JSON Response**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'listing': []
@@ -140,9 +140,9 @@ def get_results(dir_path):
 
     :returns: Dictionary of the requested result's directory listing.
 
-    * Successful JSON Response *
+    **Successful JSON Response**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'listing': [
@@ -151,9 +151,9 @@ def get_results(dir_path):
             ]
         }
 
-    * Failure JSON Response *
+    **Failure JSON Response**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'listing': []
@@ -188,9 +188,9 @@ def get_results(dir_path):
 def get_path_leader():
     ''' Return the path leader used for clean path creation.
 
-    * Example JSON Response *
+    **Example JSON Response**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {'leader': '/usr/local/ocw'}
     '''

http://git-wip-us.apache.org/repos/asf/climate/blob/eeb354b1/ocw-ui/backend/local_file_metadata_extractors.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/local_file_metadata_extractors.py b/ocw-ui/backend/local_file_metadata_extractors.py
index e70714e..e970fa1 100644
--- a/ocw-ui/backend/local_file_metadata_extractors.py
+++ b/ocw-ui/backend/local_file_metadata_extractors.py
@@ -38,9 +38,9 @@ def list_latlon(file_path):
     :returns: Dictionary containing lat/lon information if successful, otherwise
         failure information is returned.
 
-    * Example successful JSON return *
+    **Example successful JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'success': true,
@@ -52,9 +52,9 @@ def list_latlon(file_path):
             'lon_max': The maximum longitude value
         }
 
-    * Example failure JSON return *
+    **Example failure JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             'success': false,
@@ -131,9 +131,9 @@ def list_time(file_path):
     :returns: Dictionary containing time information if successful, otherwise
         failure information is returned.
 
-    * Example successful JSON return *
+    **Example successful JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             "success": true,
@@ -142,9 +142,9 @@ def list_time(file_path):
             "end_time": "2008-01-27 00:00:00"
         }
 
-    * Example failure JSON return *
+    **Example failure JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             "success": false
@@ -194,18 +194,18 @@ def list_vars(file_path):
     :returns: Dictionary containing variable information if succesful, otherwise
         failure information is returned.
 
-    * Example successful JSON return *
+    **Example successful JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             "success": true,
             "variables": List of variable names in the file
         }
 
-    * Example failure JSON return *
+    **Example failure JSON return**
 
-    .. sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             "success": false

http://git-wip-us.apache.org/repos/asf/climate/blob/eeb354b1/ocw-ui/backend/processing.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/processing.py b/ocw-ui/backend/processing.py
index 9106e80..38db1fe 100644
--- a/ocw-ui/backend/processing.py
+++ b/ocw-ui/backend/processing.py
@@ -46,7 +46,20 @@ def enable_cors():
 
 @processing_app.route('/metrics/')
 def retrieve_metrics():
-    ''''''
+    ''' Retrieve available metric names.
+
+    **Example Return JSON Format**
+
+    .. sourcecode:: javascript
+
+        {
+            'metrics': [
+                'MetricName1',
+                'MetricName2',
+                ...
+            ]
+        }
+    '''
     valid_metrics = _get_valid_metric_options().keys()
     output = json.dumps({'metrics': valid_metrics})
     response.content_type = 'application/json'
@@ -59,10 +72,10 @@ def retrieve_metrics():
 def run_evaluation():
     ''' Run an OCW Evaluation.
 
-    run_evaluation expects the Evaluation parameters to be POSTed in
+    *run_evaluation* expects the Evaluation parameters to be POSTed in
     the following format.
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         {
             reference_dataset: {
@@ -127,7 +140,6 @@ def run_evaluation():
             // format that this data is passed.
             'subregion_information': Path to a subregion file on the server.
         }
-
     '''
     # TODO: validate input parameters and return an error if not valid
 

http://git-wip-us.apache.org/repos/asf/climate/blob/eeb354b1/ocw-ui/backend/rcmed_helpers.py
----------------------------------------------------------------------
diff --git a/ocw-ui/backend/rcmed_helpers.py b/ocw-ui/backend/rcmed_helpers.py
index d47adce..f666850 100644
--- a/ocw-ui/backend/rcmed_helpers.py
+++ b/ocw-ui/backend/rcmed_helpers.py
@@ -27,9 +27,9 @@ rcmed_app = Bottle()
 def get_observation_dataset_data():
     ''' Return a list of dataset information from JPL's RCMED.
 
-    * Example Return JSON Format *
+    **Example Return JSON Format**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         [
             {
@@ -51,15 +51,15 @@ def get_observation_dataset_data():
 def get_dataset_parameters():
     ''' Return dataset specific parameter information from JPL's RCMED.
 
-    * Example Call Format *
+    **Example Call Format**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         /parameters/?dataset=<dataset's short name>
 
-    * Example Return JSON Format *
+    **Example Return JSON Format**
 
-    ..sourcecode: javascript
+    .. sourcecode:: javascript
 
         [
             {


Mime
View raw message