"""Run gates G1 then G5 of the app pier 'Ramp-A교P1' with the engine (no confirmation / approval: those are the user's review records in the app). Results: data/Ramp-A교P1/runs/current/G*_gate.json, G*.3dm. usage: python run_gates.py [G1|G5 ...]""" import json import sys from pathlib import Path APP = Path(__file__).resolve().parents[2] / "Code" / "교각모델링앱" sys.path.insert(0, str(APP)) from engine.gates import run_gate # noqa: E402 D = APP / "data" / "Ramp-A교P1" for g in sys.argv[1:] or ["G1", "G5"]: rep = run_gate(g, D / "params.json", D / "expected.json", D / "runs" / "current") print(json.dumps({k: rep[k] for k in ("gate", "verdict", "summary", "unplanned_fails", "reload", "secs")}, ensure_ascii=False)) if rep["verdict"] != "PASS": break