Relation Graph Generator¶
This notebook builds an interactive Bokeh graph of all variables (nodes) and relations (edges). It uses the relation registry only (no reactor defaults).
In [1]:
Copied!
from pathlib import Path
import sys
root = Path.cwd()
if not (root / 'src' / 'fusdb').is_dir():
for parent in root.parents:
if (parent / 'src' / 'fusdb').is_dir():
root = parent
break
src_path = str(root / 'src')
if src_path not in sys.path:
sys.path.insert(0, src_path)
from bokeh.io import output_notebook, show
from fusdb.plotting import relation_graph_plotter, save_relation_graph_html
output_notebook()
layout = relation_graph_plotter()
show(layout)
out_path = root / 'site' / 'code_docs' / 'relations_variables_graph.html'
save_relation_graph_html(out_path)
print(f'Wrote: {out_path}')
from pathlib import Path
import sys
root = Path.cwd()
if not (root / 'src' / 'fusdb').is_dir():
for parent in root.parents:
if (parent / 'src' / 'fusdb').is_dir():
root = parent
break
src_path = str(root / 'src')
if src_path not in sys.path:
sys.path.insert(0, src_path)
from bokeh.io import output_notebook, show
from fusdb.plotting import relation_graph_plotter, save_relation_graph_html
output_notebook()
layout = relation_graph_plotter()
show(layout)
out_path = root / 'site' / 'code_docs' / 'relations_variables_graph.html'
save_relation_graph_html(out_path)
print(f'Wrote: {out_path}')