Skip to content
GitLab
Menu
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
9047b9e1
Commit
9047b9e1
authored
Jul 31, 2013
by
Jerome Mariette
Browse files
allow from workflows to overload the config parser method
parent
3bde3a69
Changes
2
Show whitespace changes
Inline
Side-by-side
bin/jflow_cli.py
View file @
9047b9e1
...
...
@@ -38,7 +38,6 @@ class ConfigArgumentParser (argparse.ArgumentParser):
continue
yield
arg
def
display_workflow_status
(
workflow
,
detailed
=
False
):
if
workflow
.
start_time
:
start_time
=
time
.
asctime
(
time
.
localtime
(
workflow
.
start_time
))
else
:
start_time
=
"-"
...
...
@@ -111,6 +110,7 @@ if __name__ == '__main__':
wf_instances
=
wfmanager
.
get_available_workflows
()
wf_classes
=
[]
for
instance
in
wf_instances
:
parser
.
convert_arg_line_to_args
=
instance
.
__class__
.
config_parser
wf_classes
.
append
(
instance
.
__class__
.
__name__
)
# create the subparser for each applications
sub_parser
=
subparsers
.
add_parser
(
instance
.
name
,
help
=
instance
.
description
)
...
...
src/jflow/workflow.py
View file @
9047b9e1
...
...
@@ -97,6 +97,13 @@ class Workflow(threading.Thread):
os
.
makedirs
(
self
.
directory
,
0751
)
self
.
_serialize
()
@
staticmethod
def
config_parser
(
arg_line
):
for
arg
in
arg_line
.
split
():
if
not
arg
.
strip
():
continue
yield
arg
def
__setstate__
(
self
,
state
):
self
.
__dict__
=
state
.
copy
()
threading
.
Thread
.
__init__
(
self
,
name
=
self
.
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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