Skip to content

Commit

Permalink
utilities: output_graph_image: return filename
Browse files Browse the repository at this point in the history
  • Loading branch information
kmantel committed Jun 26, 2024
1 parent bf737c2 commit 8fd1d5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/graph_scheduler/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def output_graph_image(
graph: Union[typing_graph_dependency_dict, nx.Graph],
filename: str = None,
format: str = 'png',
):
) -> str:
"""
Writes an image representation of **graph** to file **filename**.
Expand All @@ -226,6 +226,9 @@ def output_graph_image(
supported. Pass None to display supported formats. Defaults
to png.
Returns:
name of file containing written image
Requires:
- system graphviz: https://graphviz.org/download
- Python pydot: pip install pydot
Expand Down Expand Up @@ -261,6 +264,7 @@ def output_graph_image(
raise

print(f'graph_scheduler.output_graph_image: wrote {format} to {filename}')
return filename


@functools.lru_cache()
Expand Down

0 comments on commit 8fd1d5e

Please sign in to comment.