import time from typing import Dict, Any from .runner import execute_gx, ExecutionError def run_gx_with_summary(path: str) -> Dict[str, Any]: start_time = time.time() try: context = execute_gx(path, trace=False, profile=False) duration = time.time() - start_time return { "path": path, "segments_executed": len(context.plan), "errors": [], "duration": duration, "success": True } except ExecutionError as e: duration = time.time() - start_time return { "path": path, "segments_executed": 0, "errors": [str(e)], "duration": duration, "success": False } except Exception as e: duration = time.time() - start_time return { "path": path, "segments_executed": 0, "errors": [str(e)], "duration": duration, "success": False }