Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alex Pearce
Moore
Commits
1e37bb83
Commit
1e37bb83
authored
Aug 23, 2019
by
Gitlab CI
Committed by
Alex Pearce
Aug 28, 2019
Browse files
Fixed formatting
patch generated by
https://gitlab.cern.ch/lhcb/Moore/-/jobs/5250635
parent
d140edb1
Changes
3
Hide whitespace changes
Inline
Side-by-side
PyConf/python/PyConf/components.py
View file @
1e37bb83
...
...
@@ -621,8 +621,10 @@ class Algorithm(object):
# external links #######
for
key
,
handle
in
self
.
inputs
.
items
():
edge
=
pydot
.
Edge
(
html_escape
(
'{}_out_{}'
.
format
(
handle
.
producer
.
fullname
,
handle
.
key
)),
html_escape
(
'{}_in_{}'
.
format
(
self
.
fullname
,
key
)))
edge
=
pydot
.
Edge
(
html_escape
(
'{}_out_{}'
.
format
(
handle
.
producer
.
fullname
,
handle
.
key
)),
html_escape
(
'{}_in_{}'
.
format
(
self
.
fullname
,
key
)))
graph
.
add_edge
(
edge
)
handle
.
producer
.
_graph
(
graph
)
...
...
PyConf/python/PyConf/control_flow.py
View file @
1e37bb83
...
...
@@ -93,7 +93,9 @@ class CompositeNode(object):
if
isinstance
(
child
,
Algorithm
):
# Must name nodes uniquely within a node, otherwise they will
# only be drawn one (which makes sense for the *data* flow!)
node
=
pydot
.
Node
(
html_escape
(
'{}_{}'
.
format
(
self
.
name
,
child
.
fullname
)),
label
=
child
.
fullname
)
node
=
pydot
.
Node
(
html_escape
(
'{}_{}'
.
format
(
self
.
name
,
child
.
fullname
)),
label
=
child
.
fullname
)
sg
.
add_node
(
node
)
else
:
node
=
child
.
_graph
(
sg
)
...
...
PyConf/python/PyConf/environment.py
View file @
1e37bb83
...
...
@@ -349,7 +349,7 @@ class EverythingHandler(object):
self
.
_lines
.
append
(
line
)
self
.
addNode
(
line
)
def
plot_data_flow
(
self
,
filename
=
'data_flow'
,
extensions
=
(
'gv'
,)):
def
plot_data_flow
(
self
,
filename
=
'data_flow'
,
extensions
=
(
'gv'
,
)):
"""Save a visualisation of the current data flow.
Parameters
...
...
@@ -378,7 +378,7 @@ class EverythingHandler(object):
format
=
'raw'
if
ext
==
'gv'
else
ext
top
.
write
(
'{}.{}'
.
format
(
filename
,
ext
),
format
=
format
)
def
plot_control_flow
(
self
,
filename
=
'control_flow'
,
extensions
=
(
'gv'
,)):
def
plot_control_flow
(
self
,
filename
=
'control_flow'
,
extensions
=
(
'gv'
,
)):
"""Save a visualisation of the current control flow.
Parameters
...
...
@@ -399,7 +399,8 @@ class EverythingHandler(object):
"""
# Find the node at the top of the control flow
# This is the node which is not a child of any other node
child_nodes
=
set
(
child
for
node
in
self
.
_nodes
for
child
in
node
.
children
)
child_nodes
=
set
(
child
for
node
in
self
.
_nodes
for
child
in
node
.
children
)
top_node
=
None
for
node
in
self
.
_nodes
:
if
node
not
in
child_nodes
:
...
...
@@ -409,7 +410,8 @@ class EverythingHandler(object):
now
=
_gaudi_datetime_format
(
datetime
.
datetime
.
now
())
label
=
'Control flow generated at {}'
.
format
(
now
)
graph
=
pydot
.
Dot
(
graph_name
=
'control_flow'
,
label
=
label
,
strict
=
True
,
compound
=
True
)
graph
=
pydot
.
Dot
(
graph_name
=
'control_flow'
,
label
=
label
,
strict
=
True
,
compound
=
True
)
top_node
.
_graph
(
graph
)
for
ext
in
extensions
:
...
...
Write
Preview
Supports
Markdown
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