Files
Aislo/resources/tester/test_b09_spec_column_table.py
T
eomsangdonandClaude Opus 5 f3630ab1e7 feat(b09): 규격이 열로 선 표(관부설 12-11) — 규격 칸·원문 비고를 읽어 줄은 서고 못 넣는 줄은 까닭
- 원문 비고 「별산」·「별도계산」·「설계수량」(〃·병합 칸 포함)·「필요시적용」은 안 넣는 줄로 까닭을 남김
- 규격 칸(1:2)과 관경 열(∅800mm)을 조인 키로 — 접합몰탈·고무링이 자재 줄로 섬(단가 층은 아직 없음)
- 크레인은 기종이 여럿이라 고르지 않음 — 「규격 미정 · 원문 규격 10ton/5ton」(브레인 판정 대기)
- 옆 칸 규격 「40.64㎝」 = 카탈로그 절단기 40.64(기계 운전 자료가 없어 층은 못 섬 — 사유로 드러남)
- 카탈로그 밖 자원 목록에 고무링 ∅800/1000/1200mm · 지수활제 보탬(원문 F0346 · 단가 없음)
- 범위 81공종 상태 전후 같음(못 붙은 줄의 까닭만 바뀜) · 시험 4건 · 전체 1749 통과

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn
2026-09-14 08:03:12 +09:00

63 lines
2.7 KiB
Python

"""규격이 열로 선 표(관부설 12-11) — 규격 칸·비고를 읽어 줄은 서고 못 넣는 줄은 까닭으로 드러남.
2026-09-14 축 C 1장 ② (브레인 차례 · 판정 불필요). 원문 = 산림사업 표준품셈 12-11-1·2·3.
① 원문 비고 「별산」·「별도계산」·「설계수량」(〃 · 병합 칸 포함)은 **안 넣는 줄**로 까닭을 남김
② 규격 칸(「1:2」)과 관경 열(「∅800mm」)이 조인 키 — 접합몰탈·고무링이 자재 줄로 섬
③ 기종이 여럿인 크레인은 **고르지 않고** 「규격 미정 · 원문 규격 10ton」
④ 옆 칸 규격 「40.64㎝」 = 카탈로그 절단기 40.64
"""
from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
sys.path.insert(0, str(ROOT))
from B09_Estimation.B09_Estimation_ResourceAxis import ( # noqa: E402
build_resource_axis,
load_combined_catalog,
load_work_item_master,
)
AXIS = build_resource_axis(load_work_item_master(), load_combined_catalog())
def _unmatched(code: str) -> dict[str, str]:
return {u.cell: u.reason for u in AXIS.unmatched if u.work_item_code == code}
def _rows(code: str) -> list:
return [r for r in AXIS.rows if r.work_item_code == code]
def test_원문_비고대로_안_넣는_줄은_까닭을_남긴다() -> None:
vr = _unmatched("FP-12-11-01")
assert "별도계산" in vr["VR관"] and "설계수량" in vr["기초콘크리트"]
assert "설계수량" in vr["거 푸 집"] # 「〃」
hume = _unmatched("FP-12-11-02")
assert "별산" in hume["흄 관"] and "설계수량" in hume["거 푸 집"] # 병합 칸
corrugated = _unmatched("FP-12-11-03")
assert "필요시적용" in corrugated["커플링밴드"] and "설계수량" in corrugated["모래부설"]
def test_규격_칸과_관경_열이_조인_키() -> None:
rings = {
r.variant: r.resource_spec for r in _rows("FP-12-11-01") if r.resource_name == "고무링"
}
assert rings == {"∅800mm": "∅800mm", "∅1000mm": "∅1000mm", "∅1200mm": "∅1200mm"}
mortar = [r for r in _rows("FP-12-11-02") if r.resource_name == "접합몰탈"]
assert {r.resource_spec for r in mortar} == {"1:2"} and len(mortar) == 3
def test_크레인은_고르지_않고_원문_규격을_보인다() -> None:
reason = _unmatched("FP-12-11-03")["크레인"]
assert "규격 미정" in reason and "원문 규격 5ton" in reason
assert not any(r.resource_name.startswith("크레인") for r in _rows("FP-12-11-03"))
def test_절단기_40_64cm_는_카탈로그_40_64() -> None:
cutters = [r for r in _rows("FP-12-11-02") if r.resource_name == "절단기"]
assert [(r.resource_code, str(r.amount)) for r in cutters] == [("7620-0003", "0.93")]