orkes.visualizer.TraceInspector#

class orkes.visualizer.TraceInspector(template_path=None)[source]#

A class to generate Vis.js compatible HTML visualizations from trace data.

This class takes a trace of a graph’s execution and generates an interactive HTML file that visualizes the graph’s structure and execution flow.

Parameters:

template_path (str | None)

template_path#

The path to the HTML template file.

Type:

Path

node_colors#

An iterator for cycling through the default node colors.

Type:

itertools.cycle

html_template#

The content of the HTML template file.

Type:

str

__init__(template_path=None)[source]#

Initializes the TraceInspector.

Parameters:

template_path (Optional[str], optional) – The path to the HTML template. If not provided, it defaults to ‘inspector_template.html’ in the same directory as this file.

Raises:

FileNotFoundError – If the template file cannot be found.

Methods

__init__([template_path])

Initializes the TraceInspector.

generate_html(trace_data)

Generates the HTML content for the visualization.

generate_viz(trace_data[, output_path])

Generates the HTML visualization and saves it to a file.