"""Build the throw-away data root 검증/ui_check_data for UI screenshots (2026-10-19): a new Ungok pier from the template 운곡교P1형 whose drawing index is the one of Ungok P2 (same series), so the out-of-table candidates screen has differing A / B candidates. Used with tools/serve_ui_check.py.""" import os import shutil import sys from pathlib import Path APP = Path(__file__).resolve().parents[1] TD = APP / "검증" / "ui_check_data" os.environ["PIERAPP_DATA"] = str(TD) sys.path.insert(0, str(APP / "web")) sys.path.insert(0, str(APP)) import store # noqa: E402 for n in list(TD.iterdir()): if n.name != "_템플릿": shutil.rmtree(n, ignore_errors=True) p = store.create_pier("운곡신규", "T형", "tpl:운곡교P1형") sys.path.insert(0, str(APP / "tools")) from testlib import pier_dir # noqa: E402 shutil.copytree(pier_dir("운곡교p2") / "drawings", p.drawings, dirs_exist_ok=True) aud = store.rjson(p.drawings / "audit.json", []) for a in aud: a["source_sha256"] = "x" + a["source_sha256"][1:] store.wjson(p.drawings / "audit.json", aud) print("ready", p.dir)