Merge remote-tracking branch 'origin/dev' into sub_laptop_1

This commit is contained in:
2026-09-14 18:37:03 +09:00
6 changed files with 129 additions and 15 deletions
@@ -1,7 +1,7 @@
{
"schema_version": "1.0",
"dataset_id": "data_work_item_master_manifest",
"generated_at": "2026-09-14T16:09:37+09:00",
"generated_at": "2026-09-14T18:26:57+09:00",
"built_by": "B08_Quantity/B08_Quantity_Build_WorkItemMaster.py",
"source": {
"dataset_id": "pum_forest",
@@ -12,8 +12,8 @@
"files": [
{
"file": "work_item_master_2026-01-01.json",
"sha256": "a942f7ad412441ba0c7ad3f8149fd143b10502dae5d20053e5d98029ab31c6b4",
"size_bytes": 838243
"sha256": "fa4d9bc80627d33a46b203f8910f9cc802c1249f2c6c8f09d2e818fce4332287",
"size_bytes": 838421
},
{
"file": "form_undetermined_2026-01-01.json",
@@ -3,7 +3,7 @@
"dataset_id": "work_item_master_forest",
"effective_date": "2026-01-01",
"pum_edition": "2026-01-01",
"generated_at": "2026-09-14T16:09:37+09:00",
"generated_at": "2026-09-14T18:26:57+09:00",
"dataset_version": {
"dataset_id": "pum_forest",
"effective_date": "2026-01-01",
@@ -31615,7 +31615,14 @@
"formula_rows": [],
"special_glyphs": [],
"capacity_formula_here": false,
"variant_key": [],
"variant_key": [
"1회",
"2회",
"3회",
"4회",
"5회",
"6회"
],
"condition_note": [
"구 분",
"단위",
@@ -31717,7 +31724,14 @@
]
}
],
"variant_keys": []
"variant_keys": [
"1회",
"2회",
"3회",
"4회",
"5회",
"6회"
]
},
{
"work_item_code": "FP-12-05",
@@ -0,0 +1,55 @@
"""합판거푸집 12-4 사용횟수별 비율 — 2026-09-14 브레인 ㉮ 승인.
원문 L6187~6211: 기준수량(1회사용) × 「사용횟수별 기준수량 비율(%)」 — 재료별
100·57.0·46.1·40.1·37.1·34.7 · 노무비 100·60.0·47.1·40.0·34.2·32.0 (1~6회).
종전엔 비율 셈이 없어 풀면 1회 값으로 비싸게 서므로 일부러 막아 뒀음(BLOCKED_BY_DESIGN).
⇒ 사람 판정표로 1~6회 갈래를 세우고 재료 줄엔 재료 비율 · 인력 줄엔 노무비 비율.
「사용고재 평가기준 23%」 는 원문이 셈을 안 줘([주]① 2회 이상 비율에 기포함) 값으로 안 씀.
"""
from __future__ import annotations
from B09_Estimation.B09_Estimation_KnownGaps import known_gap_note
from B09_Estimation.B09_Estimation_UnitPrice import cached_build, detail_of
def _labor(code: str) -> dict[str, float]:
rows = detail_of(cached_build(), code)["rows"]
return {r["ref_code"]: float(r["quantity"]) for r in rows if r.get("kind") == "labor"}
def test_사용횟수_여섯_갈래가_서고_인력은_노무비_비율() -> None:
titles = cached_build().book.titles
variants = sorted(c for c in titles if c.startswith("B-FP-12-04#"))
assert variants == [f"B-FP-12-04#{n}회" for n in range(1, 7)], variants
assert _labor("B-FP-12-04#1회") == {"1007": 0.22, "1002": 0.12}
assert _labor("B-FP-12-04#4회") == {"1007": 0.088, "1002": 0.048} # 40.0 %
assert _labor("B-FP-12-04#6회") == {"1007": 0.0704, "1002": 0.0384} # 32.0 %
def test_재료는_재료_비율로_읽고_못_붙은_재료는_사유() -> None:
from B09_Estimation.B09_Estimation_ResourceAxis import (
build_resource_axis,
load_combined_catalog,
load_work_item_master,
)
axis = build_resource_axis(load_work_item_master(), load_combined_catalog())
left = {u.cell for u in axis.unmatched if u.work_item_code == "FP-12-04"}
# 합판·못 은 카탈로그 없음 · 각재·철선·박리제는 규격 미정 — 값을 짓지 않고 못 붙은 줄로
assert {"합판", "못", "각재", "철선", "박리제"} <= {c.replace(" ", "") for c in left}, left
build = cached_build()
assert "FP-12-04" not in build.component_gaps and "FP-12-04" not in build.partial_ratio
note = known_gap_note("FP-12-04")
assert "사용고재" in note and "23" in note, note
def test_거푸집_갈래가_내역에서_금액이_섬() -> None:
from B09_Estimation.B09_Estimation_BillOfQuantities import build_bill
item = {"work_item_code": "FP-12-04", "name": "합판거푸집", "spec": "", "unit": "㎡",
"quantity": "10", "in_bill": True, "variant_axis": "use_count",
"variant_value": "4회"} # fmt: skip
line = next(r for r in build_bill({"work_items": [item], "materials": []}).rows
if r.code == "FP-12-04") # fmt: skip
assert line.price_code == "B-FP-12-04#4회" and line.amount_krw, line.note
+2 -2
View File
@@ -100,8 +100,8 @@ def test_단목베기_5m_미만이_실무값_근처로_선다():
build = build_unit_prices()
assert "FP-04-02-02" not in build.partial_ratio
# 합판거푸집 — 일부러 안 푼 표는 **그 까닭**이 사유로 뜬다(사용횟수 비율 미구현)
assert "사용횟수" in (build.component_gaps.get("FP-12-04") or "")
# 합판거푸집 — 2026-09-14 사용횟수 갈래로 풀림(`test_b09_formwork_use_count`) · 막힘 사유 없음
assert "FP-12-04" not in build.component_gaps
total = build.book.resolve("B-FP-04-02-02#5m미만").total
# 영월 설계내역 1.9.2 「잡관목제거 벌목(5m미만)」 @882 — 노임 연도 차이로 ±5 % 안이면 같은 읽기
assert Decimal("838") <= total <= Decimal("926"), total