You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by jo...@apache.org on 2013/08/16 19:14:31 UTC
svn commit: r1514796 -
/incubator/climate/branches/RefactorInput/ocw/evaluation.py
Author: joyce
Date: Fri Aug 16 17:14:31 2013
New Revision: 1514796
URL: http://svn.apache.org/r1514796
Log:
CLIMATE-257 - Add property for evaluation ref_dataset
Modified:
incubator/climate/branches/RefactorInput/ocw/evaluation.py
Modified: incubator/climate/branches/RefactorInput/ocw/evaluation.py
URL: http://svn.apache.org/viewvc/incubator/climate/branches/RefactorInput/ocw/evaluation.py?rev=1514796&r1=1514795&r2=1514796&view=diff
==============================================================================
--- incubator/climate/branches/RefactorInput/ocw/evaluation.py (original)
+++ incubator/climate/branches/RefactorInput/ocw/evaluation.py Fri Aug 16 17:14:31 2013
@@ -66,7 +66,7 @@ class Evaluation(object):
:raises: ValueError
'''
#: The reference dataset.
- self.ref_dataset = reference
+ self._ref_dataset = reference
#: The target dataset(s) which should each be compared with
#: the reference dataset when the evaluation is run.
self.target_datasets = []
@@ -99,6 +99,20 @@ class Evaluation(object):
self.unary_results = []
@property
+ def ref_dataset(self):
+ return self._ref_dataset
+
+ @ref_dataset.setter
+ def ref_dataset(self, value):
+ if not isinstance(value, Dataset):
+ error = (
+ "Cannot add a dataset that isn't an instance of Dataset. "
+ "Please consult the documentation for additional help."
+ )
+ raise TypeError(error)
+ self._ref_dataset = value
+
+ @property
def subregions(self):
return self._subregions