Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
force-bdss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adham Hashibon
force-bdss
Commits
2137db7f
Commit
2137db7f
authored
6 years ago
by
Stefano Borini
Browse files
Options
Downloads
Patches
Plain Diff
Setting the appropriate driver in case of run_datasource being specified
parent
ec4879e0
No related branches found
No related tags found
1 merge request
!162
Provide ability to run a single data source and check its results [WIP]
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
force_bdss/bdss_application.py
+14
-3
14 additions, 3 deletions
force_bdss/bdss_application.py
with
14 additions
and
3 deletions
force_bdss/bdss_application.py
+
14
−
3
View file @
2137db7f
...
@@ -6,8 +6,9 @@ from stevedore.exception import NoMatches
...
@@ -6,8 +6,9 @@ from stevedore.exception import NoMatches
from
envisage.api
import
Application
from
envisage.api
import
Application
from
envisage.core_plugin
import
CorePlugin
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
.factory_registry_plugin
import
FactoryRegistryPlugin
from
.core_evaluation_driver
import
CoreEvaluationDriver
from
.core_evaluation_driver
import
CoreEvaluationDriver
from
.core_mco_driver
import
CoreMCODriver
from
.core_mco_driver
import
CoreMCODriver
...
@@ -28,13 +29,23 @@ class BDSSApplication(Application):
...
@@ -28,13 +29,23 @@ class BDSSApplication(Application):
#: coordination of the MCO itself. See design notes for more details.
#: coordination of the MCO itself. See design notes for more details.
evaluate
=
Bool
()
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
.
evaluate
=
evaluate
self
.
run_datasource
=
run_datasource
self
.
workflow_filepath
=
workflow_filepath
self
.
workflow_filepath
=
workflow_filepath
plugins
=
[
CorePlugin
(),
FactoryRegistryPlugin
()]
plugins
=
[
CorePlugin
(),
FactoryRegistryPlugin
()]
if
self
.
evaluate
:
if
self
.
run_datasource
:
plugins
.
append
(
CoreRunDataSourceDriver
(
run_datasource
=
run_datasource
))
elif
self
.
evaluate
:
plugins
.
append
(
CoreEvaluationDriver
())
plugins
.
append
(
CoreEvaluationDriver
())
else
:
else
:
plugins
.
append
(
CoreMCODriver
())
plugins
.
append
(
CoreMCODriver
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment