MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / __init__

Method __init__

src/visualization/visualizer.py:16–36  ·  view source on GitHub ↗

Initialize the visualizer. Args: tracer_json_path: Path to the tracer.json file port: Port number for the web server (default: 5000)

(self, tracer_json_path: str, port: int = 5000)

Source from the content-addressed store, hash-verified

14 """Visualizer for tracer JSON files."""
15
16 def __init__(self, tracer_json_path: str, port: int = 5000):
17 """Initialize the visualizer.
18
19 Args:
20 tracer_json_path: Path to the tracer.json file
21 port: Port number for the web server (default: 5000)
22 """
23 self.tracer_json_path = Path(tracer_json_path)
24 self.port = port
25 self.app = Flask(__name__,
26 template_folder=str(Path(__file__).parent / "templates"),
27 static_folder=str(Path(__file__).parent / "static"))
28 self.records: List[Dict[str, Any]] = []
29 self._data_lock = threading.Lock()
30 self._stop_reload_thread = threading.Event()
31 self._setup_routes()
32 self._load_data()
33
34 # Start auto-reload thread (reload every 60 seconds)
35 self._reload_thread = threading.Thread(target=self._auto_reload_data, daemon=True)
36 self._reload_thread.start()
37
38 def _load_data(self):
39 """Load data from tracer.json file."""

Callers

nothing calls this directly

Calls 3

_setup_routesMethod · 0.95
_load_dataMethod · 0.95
startMethod · 0.45

Tested by

no test coverage detected