Skip to content
Snippets Groups Projects
Commit 2fa7d8eb authored by Stefano Borini's avatar Stefano Borini
Browse files

Adding result class

parent 07538967
No related branches found
No related tags found
1 merge request!12Data source result
......@@ -12,5 +12,8 @@ class BaseDataSource(six.with_metaclass(abc.ABCMeta)):
def name(self):
return self.bundle.name
@abc.abstractmethod
def run(self):
"""Executes the data source evaluation/fetching and returns
the list of results as a DataSourceResult instance."""
pass
from traits.api import HasTraits, Array, List, String, Instance
from .base_data_source import BaseDataSource
class DataSourceResult(HasTraits):
"""Represents the result of a simulator.
It contains the resulting cuba key, the associated uncertainty and the
originating simulator.
Difference between uncertainty and quality: uncertainty is a numerical value
of the value, as in the case of an experimental simulation.
quality is the level of accuracy of the (e.g.c omputational) method, as
the importance and reliability of that value. It should be an enumeration
value such as HIGH, MEDIUM, POOR"""
originator = Instance(BaseDataSource)
value_types = List(String)
results = Array(shape=(None, None))
accuracy = Array(shape=(None, None))
quality = Array(shape=(None, None))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment