- Code\rebar_pipeline, review_pipeline, pier-program을 정션에서 실제 폴더로 전환 - Code\rhino_mcp 및 CLAUDE_rhino배경.md 추가, .mcp.json은 PYTHONPATH로 새 위치 사용 - pier-program 내부 .git 제거(이력은 backup\pier-program_20261028.bundle에 보관) - worktree 가이드 반영(CLAUDE.local.md, HANDOFF.md) - D:\Rhino-MCP 경로 참조를 새 위치로 치환 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
27 lines
1.1 KiB
Python
27 lines
1.1 KiB
Python
"""Write variability.json (draft classes of every bundle, engine/variability.py) into each protected template that lacks one,
|
|
or into all with --force (2026-10-16). usage: python tools/make_variability.py [--force]"""
|
|
import json
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
APP = Path(__file__).resolve().parents[1]
|
|
sys.path.insert(0, str(APP))
|
|
from engine import variability # noqa: E402
|
|
|
|
force = "--force" in sys.argv
|
|
root = APP / "data" / "_템플릿"
|
|
for d in sorted(root.iterdir()):
|
|
if d.name.startswith("_") or not (d / "params.json").exists():
|
|
continue
|
|
out = d / "variability.json"
|
|
if out.exists() and not force:
|
|
print("keep", d.name)
|
|
continue
|
|
P = json.loads((d / "params.json").read_text(encoding="utf-8"))
|
|
E = json.loads((d / "expected.json").read_text(encoding="utf-8"))
|
|
v = variability.build(P, E)
|
|
out.write_text(json.dumps(v, ensure_ascii=False, indent=1), encoding="utf-8")
|
|
from collections import Counter
|
|
c = Counter(s["grade"] for s in v["sections"].values() if not s["info"])
|
|
print("wrote", d.name, len(v["sections"]), "bundles", dict(c), "info", sum(s["info"] for s in v["sections"].values()))
|