feat(master_data): 산림품셈 9장 로직 — 돈 로직 27 · 작업량 로직 20

- 로직_산림품셈_9장.json: 굴착기 0.7㎥ 작업량 식 절 · 인력 10%+기계 90% 터파기·되메우기 · 인력 절 · 철근절단 · 면고르기 · 뿌리다듬기 · 제근
- 불도저·플레이트콤펙터 절은 작업량만(기계 요소 없음)
- 계수_산림품셈_9장.json: 절별 굴착기 규격 · 인력·장비 비율 · 9-3-2 주④ f 표 12개
- master_formula: 범위규칙 「이상·미만」 · 분수 글자 값(「1/1.30」) 계산
- 시험: 이상·미만 경계 · 분수 값 · 9장 계수 표 본문 대조

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgUhN55Z3BCYhUJTjwTNfj
This commit is contained in:
2026-09-19 16:14:43 +09:00
co-authored by Claude Opus 5
parent 10ee321a47
commit bb89ffebc0
4 changed files with 1756 additions and 13 deletions
+17 -1
View File
@@ -83,6 +83,20 @@ def test_노체포설(whole):
]
def test_범위규칙_이상_미만(whole):
"""9-2 횡단경사 「60% 미만 · 60% 이상」 — 60 은 윗줄."""
qty = [
mf.run(whole, "산림품셈:9-2 노선 굴진 보조원", {"횡단경사": x})[""][0]["수량"]
for x in (59.9, 60)
]
assert qty == [5, 10]
def test_분수_글자_값(whole):
"""9-4-2 f 원문 「1/1.40」 — 3600×0.7×0.55×(1/1.40)×0.35/20."""
assert mf.run(whole, "산림품셈:9-4-2 암절취 집토 작업량", {})["결과"] == Decimal("17.325")
def test_범위_입력은_막음(whole):
with pytest.raises(mf.FormulaError):
mf.run(
@@ -96,7 +110,9 @@ def test_견본_파일_검사_통과(whole):
files = cm.load(SAMPLES)
assert len(files) == len(SAMPLES)
assert [x for name, data in files.items() for x in cm.check_form(name, data)] == []
assert cm.check_body(files) == []
# 9장 계수 표는 같은 절의 소요량 표와 함께 대조 — 소요량 파일 자체의 알림은 그 창 몫
with_09 = files | cm.load(["소요량_산림품셈_09장.json"])
assert [x for x in cm.check_body(with_09) if not x.startswith("소요량_산림품셈_09장")] == []
assert cm.check_logics(files, whole) == []