Commit 8c7fcf7c authored by Wout De Nolf's avatar Wout De Nolf
Browse files

esrftaskgraph: add options to show_graph

parent a08d8f44
black
pytest
flake8
matplotlib
graphlib
jupyterlab
testbook
......@@ -32,8 +32,11 @@ def assert_taskgraph_result_output(result, expected, varinfo):
assert var.value == v
def show_graph(graph):
def show_graph(graph, stdout=True, plot=True, show=True):
taskgraph = load_graph(graph)
pprint(taskgraph.dump())
networkx.draw(taskgraph.graph, with_labels=True, font_size=10)
plt.show()
if stdout:
pprint(taskgraph.dump())
if plot:
networkx.draw(taskgraph.graph, with_labels=True, font_size=10)
if show:
plt.show()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment