From 2e678ad5116b8955b880b020d952c9644e4985a4 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Mon, 14 Sep 2026 15:55:44 +0900 Subject: [PATCH] =?UTF-8?q?fix(b09):=20=EC=9A=B4=EC=A0=84=EA=B2=BD?= =?UTF-8?q?=EB=B9=84=20=ED=91=9C=20=EA=B7=9C=EA=B2=A9=20=EC=B9=B8=20?= =?UTF-8?q?=EA=B4=84=ED=98=B8=20=EB=94=B8=EB=A6=BC=EA=B0=92=EC=9D=84=20?= =?UTF-8?q?=EA=B7=9C=EA=B2=A9=20=EA=B0=9C=EC=88=98=EC=97=90=20=EC=95=88=20?= =?UTF-8?q?=EC=85=88=20=E2=80=94=20=EA=B3=B5=EA=B8=B0=EC=95=95=EC=B6=95?= =?UTF-8?q?=EA=B8=B0(5205)=20=EC=97=AC=EC=84=AF=20=EB=93=B1=2063=EA=B8=B0?= =?UTF-8?q?=EC=A2=85=20=EC=9A=B4=EC=A0=84=EA=B2=BD=EB=B9=84=EA=B0=80=20?= =?UTF-8?q?=EC=84=AC(158=E2=86=92221=20=C2=B7=20=EA=B8=B0=EC=A1=B4=20158?= =?UTF-8?q?=20=EA=B0=92=20=EB=B3=80=ED=99=94=200)=20=C2=B7=209-19-1=20?= =?UTF-8?q?=ED=9D=99=20=EA=B0=88=EB=9E=98=EA=B9=8C=EC=A7=80=20=EB=A7=89?= =?UTF-8?q?=EB=8D=98=20=E3=80=8C=EC=9D=BC=EB=B6=80=EB=A7=8C=E3=80=8D(?= =?UTF-8?q?=EA=B3=B5=EA=B8=B0=EC=95=95=EC=B6=95=EA=B8=B0=203.5)=20?= =?UTF-8?q?=ED=92=80=EB=A6=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 일위대가 금액 바뀐 제목 4(9-5-1 · 9-19-1 연암·보통암ㆍ경암 · 9-19-3) · 나머지 456 변화 0 · 기계 층 미완성 6→4 배정 프로젝트: 면고르기 칸 비면 합계 그대로 · 칸 고르면 성토면 인력 점토 3,269원/㎡ · 절토면 호박돌 4,353원/㎡ 금액 섬(되돌림) Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01BW6Jdsh18WPtYUR6THZJqn --- .../B09_Estimation_MachineOperating.py | 4 ++- resources/tester/test_b08_face_dressing.py | 10 +++--- .../tester/test_b09_operating_paren_spec.py | 34 +++++++++++++++++++ resources/tester/test_b09_table_reading_2.py | 4 +-- 4 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 resources/tester/test_b09_operating_paren_spec.py diff --git a/B09_Estimation/B09_Estimation_MachineOperating.py b/B09_Estimation/B09_Estimation_MachineOperating.py index cfaacc55..9cc5f298 100644 --- a/B09_Estimation/B09_Estimation_MachineOperating.py +++ b/B09_Estimation/B09_Estimation_MachineOperating.py @@ -201,7 +201,9 @@ def parse_operating_tables( if codes: carry_prefix = codes[-1][:4] names = _tokens(row[1]) - specs = _tokens(row[2]) + # 규격 칸의 괄호 토큰은 **앞 규격의 딸림값**(「100 (155)」 · 크레인 「15 (0.38)」) — + # 규격 하나로 세면 코드 수와 안 맞아 줄째 버려짐(공기압축기 5205 여섯 · 09-14). + specs = [token for token in _tokens(row[2]) if not token.startswith("(")] fuels = _tokens(row[3]) miscs = _tokens(row[4]) operators = _tokens(row[5]) diff --git a/resources/tester/test_b08_face_dressing.py b/resources/tester/test_b08_face_dressing.py index 94dfd362..e5f26a19 100644 --- a/resources/tester/test_b08_face_dressing.py +++ b/resources/tester/test_b08_face_dressing.py @@ -191,10 +191,10 @@ def test_고르는_갈래는_원문_표_두_벌과_마스터_갈래_키가_같 # ── 내역 — 갈래가 서면 금액 · 기계는 사유 ───────────────────────────── -def test_내역은_암_리핑_줄에_금액이_서고_토사면_고르기는_아래층_사유를_그대로() -> None: - """9-19-2(연암 · 리핑) 는 금액이 섬. 9-19-1 은 지금 공종 단위 「일부만」 표시(연암·보통암 갈래의 - 공기압축기 3.5 손료 미확보)에 걸려 흙 갈래까지 막힘 — 그 까닭이 덮이지 않고 올라와야 함. - ⚠ 다음 차례(공기압축기 손료)가 서면 이 둘째 단언이 뒤집힘 — 그때 금액 단언으로 바꿀 것. +def test_내역은_갈래가_서면_금액이_서고_성토면_기계는_규격_미정_사유() -> None: + """9-19-2(연암 · 리핑) · 9-19-1(성토면 인력 점토 500㎡ × 3,269원) 금액이 섬. + ⓘ 9-19-1 은 첫 커밋(ee9368ec) 때 공기압축기 3.5 손료 미확보(공종 단위 「일부만」)에 막혀 있었고 + 운전경비 표 괄호 딸림값 파서 고침으로 풀림(같은 날 · `test_b09_operating_paren_spec`). 성토면·기계는 [주]·규격 미정 사유가 후보 목록 곁에 붙음(Ⓓ).""" from B09_Estimation.B09_Estimation_BillOfQuantities import build_bill @@ -203,7 +203,7 @@ def test_내역은_암_리핑_줄에_금액이_서고_토사면_고르기는_아 ripping = next(r for r in rows if r.code == "FP-09-19-02") assert ripping.amount_krw and int(ripping.amount_krw) > 0, ripping.note fill = next(r for r in rows if r.code == "FP-09-19-01" and r.spec == FILL_CLAY) - assert fill.amount_krw is None and "공기압축기" in fill.note, fill.note + assert fill.amount_krw == 500 * 3269, fill.note machine = _handoff(face_dressing_cut_class=CUT_SAND, face_dressing_fill_class="성토면 · 기계") row = next( r for r in build_bill(machine).rows if r.code == "FP-09-19-01" and r.spec == "성토면" diff --git a/resources/tester/test_b09_operating_paren_spec.py b/resources/tester/test_b09_operating_paren_spec.py new file mode 100644 index 00000000..eb458698 --- /dev/null +++ b/resources/tester/test_b09_operating_paren_spec.py @@ -0,0 +1,34 @@ +"""운전경비 표 규격 칸의 괄호 딸림값 — 2026-09-14 공기압축기 손료(브레인 차례). + +품셈 8-4 운전경비 표는 규격 칸에 딸림값을 괄호로 붙여 적음 — +「50ton/hr(93㎾) 100 (155) 150 (260)」 · 크레인 「10ton (0.29) 15 (0.38)」. +파서가 괄호 토큰도 규격 하나로 세어 코드 수와 안 맞는다며 **줄째 버렸음** → 공기압축기(5205) +여섯 · 크레인 26 · 콘크리트 기계 등이 운전경비를 잃고 기계 층이 「미완성」으로 섬. +9-19-1 연암·보통암 · 9-19-3 의 공기압축기 3.5 가 그래서 「일부만」 으로 막혔음. +""" + +from __future__ import annotations + +from B09_Estimation.B09_Estimation_MachineOperating import load_operating_records +from B09_Estimation.B09_Estimation_UnitPrice import cached_build, detail_of + + +def test_괄호_딸림값은_규격_개수에_안_셈_공기압축기_운전경비가_섬() -> None: + result = load_operating_records() + records = {record.machine_code: record for record in result.records} + compressor = records.get("5205-0035") + assert compressor is not None, result.dropped_tables + assert (str(compressor.fuel_liters_per_hour), compressor.fuel_kind) == ("6.2", "경유") + assert str(compressor.misc_material_percent) == "16" + assert str(compressor.operator_person_days) == "1" + assert not [t for t in result.dropped_tables if t.startswith("8-4-6")], result.dropped_tables + + +def test_공기압축기_층이_서서_토사면_고르기_암_갈래에_붙음() -> None: + build = cached_build() + assert "5205-0035" not in build.incomplete_machines + rows = { + r["ref_code"]: float(r["quantity"]) + for r in detail_of(build, "B-FP-09-19-01#절토면·연암")["rows"] + } + assert rows.get("X-5205-0035") == 0.125, rows diff --git a/resources/tester/test_b09_table_reading_2.py b/resources/tester/test_b09_table_reading_2.py index cc653034..e165ba5b 100644 --- a/resources/tester/test_b09_table_reading_2.py +++ b/resources/tester/test_b09_table_reading_2.py @@ -90,8 +90,8 @@ def test_토사면_고르기_절토면은_토질_여섯_갈래로_규격까지_ sand = _per_m2(CUT + "모래ㆍ사질토ㆍ점토ㆍ점질토") assert sand == {"1002": 0.005, "X-0201-0070": 0.015}, sand soft_rock = _per_m2(CUT + "연암") - assert soft_rock == {"1002": 0.046, "X-5210-0010": 0.245}, soft_rock - # 공기압축기 3.5 는 코드까지 이어지나 기계 단가 층(손료) 미확보 — 9-19-3 과 같은 종전 자리 + # 공기압축기 3.5 — 운전경비 표 괄호 딸림값 파서 고침(같은 날)으로 기계 층이 서서 붙음 + assert soft_rock == {"1002": 0.046, "X-5205-0035": 0.125, "X-5210-0010": 0.245}, soft_rock from B09_Estimation.B09_Estimation_ResourceAxis import ( build_resource_axis, load_combined_catalog,