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

Function main

tests/test_visualization.py:14–47  ·  view source on GitHub ↗

Main entry point for the visualization server.

()

Source from the content-addressed store, hash-verified

12
13
14def main():
15 """Main entry point for the visualization server."""
16 parser = argparse.ArgumentParser(description='Run tracer visualization server')
17 parser.add_argument(
18 '--tracer_json',
19 default=os.path.join(root, 'workdir', 'offline_trading_agent', 'tracer.json'),
20 type=str,
21 help='Path to tracer.json file'
22 )
23 parser.add_argument(
24 '--port',
25 type=int,
26 default=8088,
27 help='Port number for the web server (default: 8080)'
28 )
29 parser.add_argument(
30 '--debug',
31 action='store_true',
32 help='Run in debug mode'
33 )
34
35 args = parser.parse_args()
36
37 tracer_path = Path(args.tracer_json)
38 if not tracer_path.exists():
39 print(f"Error: Tracer JSON file not found: {tracer_path}")
40 sys.exit(1)
41
42 try:
43 visualizer = TracerVisualizer(str(tracer_path), port=args.port)
44 visualizer.run(debug=args.debug)
45 except Exception as e:
46 print(f"Error starting visualization server: {e}")
47 sys.exit(1)
48
49
50if __name__ == '__main__':

Callers 1

Calls 5

runMethod · 0.95
TracerVisualizerClass · 0.90
printFunction · 0.85
joinMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected