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

This commit is contained in:
2026-09-14 16:12:20 +09:00
4 changed files with 44 additions and 8 deletions
@@ -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])
+5 -5
View File
@@ -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 == "성토면"
@@ -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
+2 -2
View File
@@ -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,