climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [2/8] climate git commit: CLIMATE-606 - Fix indices misspellings in config parser code
Date Thu, 19 Mar 2015 14:18:59 GMT
CLIMATE-606 - Fix indices misspellings in config parser code


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

Branch: refs/heads/master
Commit: 66b08b6aab417de18fa737b9188ef95656000c2c
Parents: dca99e0
Author: Michael Joyce <joyce@apache.org>
Authored: Wed Mar 18 11:15:00 2015 -0700
Committer: Michael Joyce <joyce@apache.org>
Committed: Wed Mar 18 11:15:00 2015 -0700

----------------------------------------------------------------------
 ocw-config-runner/configuration_parsing.py                | 2 +-
 ocw-config-runner/example/simple_model_to_model_bias.yaml | 2 +-
 ocw-config-runner/plot_generation.py                      | 2 +-
 ocw-config-runner/tests/test_config_parsing.py            | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/66b08b6a/ocw-config-runner/configuration_parsing.py
----------------------------------------------------------------------
diff --git a/ocw-config-runner/configuration_parsing.py b/ocw-config-runner/configuration_parsing.py
index 43285f7..477488e 100644
--- a/ocw-config-runner/configuration_parsing.py
+++ b/ocw-config-runner/configuration_parsing.py
@@ -202,7 +202,7 @@ def _valid_plot_config_data(plot_config_data):
 
     if plot_type == 'contour':
         required_keys = set([
-                'results_indeces',
+                'results_indices',
                 'lats',
                 'lons',
                 'output_name'

http://git-wip-us.apache.org/repos/asf/climate/blob/66b08b6a/ocw-config-runner/example/simple_model_to_model_bias.yaml
----------------------------------------------------------------------
diff --git a/ocw-config-runner/example/simple_model_to_model_bias.yaml b/ocw-config-runner/example/simple_model_to_model_bias.yaml
index fe2cd36..bd59fbd 100644
--- a/ocw-config-runner/example/simple_model_to_model_bias.yaml
+++ b/ocw-config-runner/example/simple_model_to_model_bias.yaml
@@ -20,7 +20,7 @@ metrics:
 
 plots:
     - type: contour
-      results_indeces:
+      results_indices:
           - !!python/tuple [0, 0]
       lats:
           range_min: -20

http://git-wip-us.apache.org/repos/asf/climate/blob/66b08b6a/ocw-config-runner/plot_generation.py
----------------------------------------------------------------------
diff --git a/ocw-config-runner/plot_generation.py b/ocw-config-runner/plot_generation.py
index 5d24f49..2a74878 100644
--- a/ocw-config-runner/plot_generation.py
+++ b/ocw-config-runner/plot_generation.py
@@ -63,7 +63,7 @@ def _draw_contour_plot(evaluation, plot_config):
         lons = range(lons['range_min'], lons['range_max'], lons['range_step'])
 
 
-    for i, (row, col) in enumerate(plot_config['results_indeces']):
+    for i, (row, col) in enumerate(plot_config['results_indices']):
         plot_name = plot_config['output_name'] + '_{}'.format(i)
         plots.draw_contour_map(evaluation.results[row][col],
                                 np.array(lats),

http://git-wip-us.apache.org/repos/asf/climate/blob/66b08b6a/ocw-config-runner/tests/test_config_parsing.py
----------------------------------------------------------------------
diff --git a/ocw-config-runner/tests/test_config_parsing.py b/ocw-config-runner/tests/test_config_parsing.py
index 36ef9be..077e8e7 100644
--- a/ocw-config-runner/tests/test_config_parsing.py
+++ b/ocw-config-runner/tests/test_config_parsing.py
@@ -599,7 +599,7 @@ class ContourMapConfig(unittest.TestCase):
     def setUpClass(self):
         valid_contour_config = """
             type: contour
-            results_indeces:
+            results_indices:
                 - !!python/tuple [0, 0]
             lats:
                 range_min: -20
@@ -619,7 +619,7 @@ class ContourMapConfig(unittest.TestCase):
         self.missing_keys_contour = yaml.load(missing_keys_contour_config)
 
         self.required_contour_keys = set([
-            'results_indeces',
+            'results_indices',
             'lats',
             'lons',
             'output_name'
@@ -653,7 +653,7 @@ class TestInvalidPlotConfig(unittest.TestCase):
         self.bad_plot_type = yaml.load(bad_plot_type_config)
 
         missing_plot_type_config = """
-            results_indeces:
+            results_indices:
                 - !!python/tuple [0, 0]
             lats:
                 range_min: -20


Mime
View raw message