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
382753fa
Commit
382753fa
authored
Dec 03, 2014
by
Jerome Mariette
Browse files
add the display_name of the input/inputs
parent
2d8a1085
Changes
3
Hide whitespace changes
Inline
Side-by-side
bin/jflow_cli.py
View file @
382753fa
...
...
@@ -153,11 +153,11 @@ if __name__ == '__main__':
inputs
,
components
=
[],
[]
for
node
in
gr
.
nodes
():
if
Workflow
.
INPUT_GRAPH_LABEL
in
gr
.
node_attributes
(
node
):
inputs
.
append
(
node
)
inputs
.
append
(
gr
.
node
_attributes
(
node
)[
1
]
)
elif
Workflow
.
INPUTS_GRAPH_LABEL
in
gr
.
node_attributes
(
node
):
inputs
.
append
(
node
)
inputs
.
append
(
gr
.
node
_attributes
(
node
)[
1
]
)
elif
Workflow
.
COMPONENT_GRAPH_LABEL
in
gr
.
node_attributes
(
node
):
components
.
append
(
node
)
components
.
append
(
gr
.
node
_attributes
(
node
)[
1
]
)
print
"inputs: "
,
inputs
print
"components: "
,
components
print
"edges: "
,
gr
.
edges
()
...
...
bin/jflow_server.py
View file @
382753fa
...
...
@@ -412,11 +412,11 @@ class JFlowServer (object):
nodes
=
[]
for
node
in
g
.
nodes
():
if
Workflow
.
INPUT_GRAPH_LABEL
in
g
.
node_attributes
(
node
):
nodes
.
append
({
"name"
:
node
,
"type"
:
"input"
})
nodes
.
append
({
"name"
:
node
,
"display_name"
:
g
.
node_attributes
(
node
)[
1
],
"type"
:
"input"
})
elif
Workflow
.
INPUTS_GRAPH_LABEL
in
g
.
node_attributes
(
node
):
nodes
.
append
({
"name"
:
node
,
"type"
:
"inputs"
})
nodes
.
append
({
"name"
:
node
,
"display_name"
:
g
.
node_attributes
(
node
)[
1
],
"type"
:
"inputs"
})
elif
Workflow
.
COMPONENT_GRAPH_LABEL
in
g
.
node_attributes
(
node
):
nodes
.
append
({
"name"
:
node
,
"type"
:
"component"
})
nodes
.
append
({
"name"
:
node
,
"display_name"
:
g
.
node_attributes
(
node
)[
1
],
"type"
:
"component"
})
status
[
"nodes"
]
=
nodes
status
[
"edges"
]
=
g
.
edges
()
return
status
...
...
src/jflow/workflow.py
View file @
382753fa
...
...
@@ -346,14 +346,17 @@ class Workflow(threading.Thread):
if
issubclass
(
ioparameter
.
__class__
,
InputFile
):
gr
.
add_node
(
ioparameter
.
name
)
gr
.
add_node_attribute
(
ioparameter
.
name
,
self
.
INPUT_GRAPH_LABEL
)
gr
.
add_node_attribute
(
ioparameter
.
name
,
ioparameter
.
display_name
)
all_nodes
[
ioparameter
.
name
]
=
None
elif
issubclass
(
ioparameter
.
__class__
,
InputFileList
):
gr
.
add_node
(
ioparameter
.
name
)
gr
.
add_node_attribute
(
ioparameter
.
name
,
self
.
INPUTS_GRAPH_LABEL
)
gr
.
add_node_attribute
(
ioparameter
.
name
,
ioparameter
.
display_name
)
all_nodes
[
ioparameter
.
name
]
=
None
for
cpt
in
self
.
components
:
gr
.
add_node
(
cpt
.
get_nameid
())
gr
.
add_node_attribute
(
cpt
.
get_nameid
(),
self
.
COMPONENT_GRAPH_LABEL
)
gr
.
add_node_attribute
(
cpt
.
get_nameid
(),
cpt
.
get_nameid
())
all_nodes
[
cpt
.
get_nameid
()]
=
None
for
cpt
in
self
.
components
:
for
ioparameter
in
cpt
.
__dict__
.
values
():
...
...
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