diff --git a/osdk/graph.py b/osdk/graph.py index 82a932e..3e4c99c 100644 --- a/osdk/graph.py +++ b/osdk/graph.py @@ -7,7 +7,7 @@ def view(context: Context, scope: str | None = None, showExe: bool = True, showD g = Digraph(context.target.id, filename='graph.gv') - g.attr('graph', splines='ortho', rankdir='BT') + g.attr('graph', splines='ortho', rankdir='BT', ranksep='1.5') g.attr('node', shape='ellipse') g.attr( 'graph', label=f"<{scope or 'Full Dependency Graph'}
{context.target.id}>", labelloc='t') @@ -37,7 +37,11 @@ def view(context: Context, scope: str | None = None, showExe: bool = True, showD g.edge(instance.manifest.id, req) for req in instance.manifest.provides: - g.edge(req, instance.manifest.id, arrowhead="none") + isChosen = context.target.routing.get( + req, None) == instance.manifest.id + + g.edge(req, instance.manifest.id, arrowhead="none", color=( + "blue" if isChosen else "black")) elif showDisabled: g.node(instance.manifest.id, f"<{instance.manifest.id}
{vt100.wordwrap(instance.manifest.decription, 40,newline='
')}

{vt100.wordwrap(instance.disableReason, 40,newline='
')}
>", shape="plaintext", style="filled", fontcolor="#999999", fillcolor="#eeeeee")