Skip to content
Snippets Groups Projects

Provide ability to run a single data source and check its results [WIP]

Closed Adham Hashibon requested to merge single-datasource-execution into master
1 file
+ 14
3
Compare changes
  • Side-by-side
  • Inline
@@ -6,8 +6,9 @@ from stevedore.exception import NoMatches
from envisage.api import Application
from envisage.core_plugin import CorePlugin
from traits.api import Unicode, Bool
from traits.api import Unicode, Bool, Either
from force_bdss.core_run_datasource_driver import CoreRunDataSourceDriver
from .factory_registry_plugin import FactoryRegistryPlugin
from .core_evaluation_driver import CoreEvaluationDriver
from .core_mco_driver import CoreMCODriver
@@ -28,13 +29,23 @@ class BDSSApplication(Application):
#: coordination of the MCO itself. See design notes for more details.
evaluate = Bool()
def __init__(self, evaluate, workflow_filepath):
#: This entry, if not None, drives the evaluator to run a single
#: data source in the workflow. It accepts input parameters on standard
#: input and returns the output to standard output.
run_datasource = Either(Unicode(), None)
def __init__(self, evaluate, run_datasource, workflow_filepath):
self.evaluate = evaluate
self.run_datasource = run_datasource
self.workflow_filepath = workflow_filepath
plugins = [CorePlugin(), FactoryRegistryPlugin()]
if self.evaluate:
if self.run_datasource:
plugins.append(CoreRunDataSourceDriver(
run_datasource=run_datasource
))
elif self.evaluate:
plugins.append(CoreEvaluationDriver())
else:
plugins.append(CoreMCODriver())
Loading