MCPcopy
hub / github.com/openai/plugins / execute_plan

Function execute_plan

plugins/ngs-analysis/scripts/run_dna_somatic_variants.py:554–566  ·  view source on GitHub ↗
(run_dir: Path, plan: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

552
553
554def execute_plan(run_dir: Path, plan: list[dict[str, Any]]) -> dict[str, Any]:
555 for dirname in ["variants", "qc", "logs", "f1r2"]:
556 (run_dir / dirname).mkdir(parents=True, exist_ok=True)
557 result: dict[str, Any] = {"ok": True, "steps": []}
558 for index, item in enumerate(plan, start=1):
559 step = run_cmd(["bash", "-c", item["command"]], run_dir, timeout=7200)
560 safe_name = item["name"].replace(":", "").replace(" ", "_").replace("/", "_")
561 write_json(run_dir / "logs" / f"{index:02d}_{safe_name}.json", step)
562 result["steps"].append({"name": item["name"], "ok": step.get("ok")})
563 result["ok"] = bool(result["ok"] and step.get("ok"))
564 if not step.get("ok"):
565 break
566 return result
567
568
569def write_summary(

Callers 1

mainFunction · 0.70

Calls 3

run_cmdFunction · 0.90
write_jsonFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected