"""Run the app gate checkers on a saved .3dm (opened headless). usage: python check_model.py [G1 G2 ...] Writes /.json per checker. """ import sys from pathlib import Path APP = Path(__file__).resolve().parents[1] sys.path.insert(0, str(APP)) from engine.pipeline import check_steps # noqa: E402 from runner import run_job # noqa: E402 if __name__ == "__main__": model, expected, out = (Path(a).resolve() for a in sys.argv[1:4]) gates = sys.argv[4:] or None out.mkdir(parents=True, exist_ok=True) r = run_job(check_steps(expected, out, gates), open_path=model) print("wall", r["wall_secs"], "s") for st in r["steps"]: print(f"{st['name']:<26} {st['secs']:>7}s {st['stdout'].splitlines()[0] if st['stdout'] else ''}")