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
38cfb5e3
Commit
38cfb5e3
authored
Aug 11, 2014
by
Jerome Mariette
Browse files
multiparam close to be ok
parent
86d4b205
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/jflow/parameter.py
View file @
38cfb5e3
...
...
@@ -249,7 +249,7 @@ class AbstractParameter(object):
self
.
action
=
MiltipleAction
self
.
global_help
=
self
.
help
self
.
help
=
self
.
global_help
+
" ("
+
param_flag
+
"=<"
+
param
.
type
.
__name__
.
upper
()
+
">)"
self
.
default
=
{
param
_flag
:
param
.
default
}
self
.
default
=
{
param
.
name
:
param
.
default
}
self
.
nargs
=
"+"
elif
self
.
type
.
__class__
==
MultipleParameters
:
self
.
type
.
types
[
param_flag
]
=
param
.
type
...
...
@@ -259,7 +259,8 @@ class AbstractParameter(object):
if
param
.
required
:
self
.
type
.
required
.
append
(
param_flag
)
self
.
help
=
self
.
global_help
+
self
.
type
.
get_help
()
self
.
default
[
param_flag
]
=
param
.
default
self
.
default
[
param
.
name
]
=
param
.
default
param
.
flag
=
param_flag
self
.
sub_parameters
.
append
(
param
)
...
...
src/jflow/workflow.py
View file @
38cfb5e3
...
...
@@ -203,7 +203,16 @@ class Workflow(threading.Thread):
self
.
__setattr__
(
param
.
name
,
new_param
)
elif
param
.
__class__
==
ParameterList
or
param
.
__class__
==
InputFileList
:
self
.
__getattribute__
(
param
.
name
).
extend
(
args
[
param
.
name
])
elif
param
.
__class__
==
MultiParameter
:
sub_args
=
{}
for
sarg
in
args
[
param
.
name
]:
sub_args
[
sarg
[
0
]]
=
sarg
[
1
]
for
sub_param
in
param
.
sub_parameters
:
if
sub_args
.
has_key
(
sub_param
.
flag
):
self
.
__getattribute__
(
param
.
name
)[
sub_param
.
name
]
=
sub_args
[
sub_param
.
flag
]
else
:
self
.
__getattribute__
(
param
.
name
)[
sub_param
.
name
]
=
self
.
__getattribute__
(
param
.
name
).
default
[
sub_param
.
name
]
"""
def _get_from_config(self, parameters_section):
reader = ConfigParser()
...
...
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