Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
87608adf
Commit
87608adf
authored
Jul 11, 2014
by
Jerome Mariette
Browse files
change components for components_to_exec
parent
7401ca13
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/jflow/workflow.py
View file @
87608adf
...
...
@@ -70,7 +70,7 @@ class Workflow(threading.Thread):
threading
.
Thread
.
__init__
(
self
)
self
.
jflow_config_reader
=
JFlowConfigReader
()
self
.
manager
=
WorkflowsManager
()
self
.
components
=
[]
self
.
components
_to_exec
=
[]
self
.
makes
=
{}
self
.
globals
=
{}
self
.
options
=
Options
()
...
...
@@ -171,7 +171,7 @@ class Workflow(threading.Thread):
# if already init, add the component to the list and check if weaver should be executed
if
self
.
component_nameids_is_init
:
# add the component
self
.
components
.
append
(
cmpt_object
)
self
.
components
_to_exec
.
append
(
cmpt_object
)
self
.
_execute_weaver
()
# update outputs
for
output
in
cmpt_object
.
get_dynamic_outputs
():
...
...
@@ -181,16 +181,16 @@ class Workflow(threading.Thread):
raise
ValueError
(
"Component "
+
cmpt_object
.
__class__
.
__name__
+
" with prefix "
+
cmpt_object
.
prefix
+
" already exist in this pipeline!"
)
self
.
component_nameids
[
cmpt_object
.
get_nameid
()]
=
None
self
.
components
=
[]
self
.
components
_to_exec
=
[]
else
:
if
self
.
component_nameids_is_init
:
# add the component
self
.
components
.
append
(
cmpt_object
)
self
.
components
_to_exec
.
append
(
cmpt_object
)
elif
not
self
.
component_nameids_is_init
and
not
self
.
dynamic_component_present
:
if
self
.
_component_is_duplicated
(
cmpt_object
):
raise
ValueError
(
"Component "
+
cmpt_object
.
__class__
.
__name__
+
" with prefix "
+
cmpt_object
.
prefix
+
" already exist in this pipeline!"
)
self
.
components
.
append
(
cmpt_object
)
self
.
components
_to_exec
.
append
(
cmpt_object
)
else
:
if
self
.
_component_is_duplicated
(
cmpt_object
):
raise
ValueError
(
"Component "
+
cmpt_object
.
__class__
.
__name__
+
" with prefix "
+
...
...
@@ -270,7 +270,7 @@ class Workflow(threading.Thread):
self
.
end_time
=
time
.
time
()
self
.
_serialize
()
raise
if
len
(
self
.
components
)
>
0
:
if
len
(
self
.
components
_to_exec
)
>
0
:
self
.
_execute_weaver
()
self
.
step
=
3
self
.
_serialize
()
...
...
@@ -557,7 +557,7 @@ class Workflow(threading.Thread):
with
self
.
options
:
if
new_make
:
try
:
for
component
in
self
.
components
:
for
component
in
self
.
components
_to_exec
:
nest
.
symbol
=
component
.
get_nameid
()
nest
.
batch
=
component
.
batch_options
self
.
component_nameids
[
component
.
get_nameid
()]
=
os
.
path
.
join
(
current_working_directory
,
self
.
MAKEFLOW_LOG_FILE_NAME
)
...
...
@@ -569,7 +569,7 @@ class Workflow(threading.Thread):
self
.
end_time
=
time
.
time
()
self
.
_serialize
()
raise
self
.
components
=
[]
self
.
components
_to_exec
=
[]
# Once a weaver script is compiled, serialize the workflow
self
.
_serialize
()
try
:
...
...
@@ -582,7 +582,7 @@ class Workflow(threading.Thread):
def
_get_current_make
(
self
):
current_component
,
make_directory
,
new_make
=
[],
None
,
False
for
component
in
self
.
components
:
for
component
in
self
.
components
_to_exec
:
current_component
.
append
(
component
.
get_nameid
())
for
make
in
self
.
makes
:
if
set
(
current_component
)
==
set
(
self
.
makes
[
make
]):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment