Skip to content

Commit

Permalink
DEPENDS_ON arrows and text bold (#930)
Browse files Browse the repository at this point in the history
* Make DEPENDS_ON and RESTARTED_FROM arrows and text bold for dag

---------

Co-authored-by: leahh <[email protected]>
  • Loading branch information
Leahh02 and leahh authored Sep 24, 2024
1 parent f52049c commit cd51dc2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion beeflow/common/gdb/generate_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def get_node_label_and_color(label, attributes, label_to_color):
"""Return the appropriate node label and color based on node type."""
label_to_attribute = {
":Workflow": "Workflow",
":Output": attributes.get('value', label),
":Output": attributes.get('glob', label),
":Metadata": attributes.get('state', label),
":Task": attributes.get('name', label),
":Input": attributes.get('source', label),
Expand All @@ -77,5 +77,8 @@ def add_edges_to_dot(graph, dot):
edge_label = attributes.get('label', '')
if edge_label in ('INPUT_OF', 'DESCRIBES', 'HINT_OF', 'REQUIREMENT_OF'):
dot.edge(source, target, label=edge_label, fontsize="10")
elif edge_label in ('DEPENDS_ON', 'RESTARTED_FROM'):
dot.edge(target, source, label=edge_label, penwidth="3",
fontsize="10", fontname="times-bold")
else:
dot.edge(target, source, label=edge_label, fontsize="10")
Binary file removed docs/sphinx/images/941cd5.png
Binary file not shown.
Binary file added docs/sphinx/images/cat-dag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/sphinx/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Example DAG
The DAG below was created by running the dag command while the cat-grep-tar
example workflow was running.

.. image:: images/941cd5.png
.. image:: images/cat-dag.png

The orange bubbles are inputs, the blue bubbles are task states, the red
bubbles are tasks, and the green bubbles are outputs. The graph is in a
Expand Down

0 comments on commit cd51dc2

Please sign in to comment.