Refactor show graph, allow for explicit calling of formats, add interactive widget for Jupyter
As per title.
Allows for explicit calling of:
show_graph_pilshow_graph_graphviz
Adds:
show_graph_widget: uses ipydagred3 which was written explicitly for use withcsp
Modifies:
show_graphto check if in Jupyter, and if so, either use the new widget display or return theDigraphfor inline viewing
A small unrelated change is included: Replacing base Exception in symphony.py and profiler.py with RuntimeError and ModuleNotFoundError, respectively.
It takes longer to create the graph widget, but once created, it renders much faster.
Using the 16 bit nand computer as an example "large" graph, Preview has issues showing the png, whereas the widget displays it fluidly. Note that the blurring and tearing is NOT gif recording artifacts, but due to Preview. During the mouse shaking, Preview is frozen (the spinning pinwheel is displayed but doesn't show on the recording).
Note that I'm planning on moving this to daggre so that we can use the interactive visualization outside of Jupyter.