fix(paths): 옛 자료 폴더 이동 뒤 서버 불러오기 복구 - 경로 상수만 old/ref 새 자리로
B05·B06·B08·B09·Z01·common_util 의 data_* 폴더·파일 이름 상수를 master_data/old · ref 의 새 이름으로 돌림. 로직은 그대로. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
@@ -27,8 +27,8 @@ from dataclasses import dataclass, field
|
||||
from decimal import Decimal
|
||||
from typing import Any
|
||||
|
||||
_CATALOG_SUBPATH = ("resources", "data_cost_input_value")
|
||||
_OUTPUT_SUBPATH = ("resources", "data_cost_machine_operating")
|
||||
_CATALOG_SUBPATH = ("resources", "master_data", "old")
|
||||
_OUTPUT_SUBPATH = ("resources", "master_data", "old")
|
||||
|
||||
#: 품셈 8-4 운전경비 표의 머리글 — 이 여섯이 다 있어야 그 표로 본다.
|
||||
_REQUIRED_HEADERS = ("분류번호", "기계명", "규격", "주연료", "잡재료", "조종원")
|
||||
@@ -359,8 +359,8 @@ def enrich_with_catalog(
|
||||
|
||||
|
||||
def load_operating_records(
|
||||
pum_file: str = "pum_const_2026.json",
|
||||
labor_file: str = "labor_const_2026-01-01.json",
|
||||
pum_file: str = "3_품셈_건설_표전체_2026-01-01.json",
|
||||
labor_file: str = "1_기초_노임_건설업_대한건설협회_2026-01-01.json",
|
||||
) -> OperatingParseResult:
|
||||
from B09_Estimation.B09_Estimation_MachineCost import load_machine_catalog
|
||||
|
||||
@@ -394,7 +394,7 @@ def write_operating_records(
|
||||
"""파생 파일로 낸다. **어느 기준자료 판에서 파생됐는지**를 함께 적는다."""
|
||||
directory = output_dir or os.path.join(_project_root(), *_OUTPUT_SUBPATH)
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
path = os.path.join(directory, "machine_operating_2026.json")
|
||||
path = os.path.join(directory, "3_품셈_건설_기계운전경비_8-4_2026-01-01.json")
|
||||
|
||||
payload = {
|
||||
"schema_version": "1.0",
|
||||
@@ -419,7 +419,7 @@ def write_operating_records(
|
||||
|
||||
#: 시도별 유가 판 — 품셈 8-1-7 5호 「유류가격은 **해당지역의 가격**으로 한다」.
|
||||
#: ⚠ **파일이 있을 때만 지역을 고를 수 있다** — 없으면 전국평균 한 벌로 돈다(코드로 막지 않음).
|
||||
REGIONAL_OIL_FILE = "oil_regional_2026-09-09.json"
|
||||
REGIONAL_OIL_FILE = "1_기초_유가_시도별_오피넷_2026-09-09.json"
|
||||
#: 운전경비표 연료 종류 → 유가 판 변수. ⚠ 종류를 안 읽고 경유로 때우면 휘발유 기계가 싸게 섬
|
||||
#: (2026-09-14 661 뒤 ② — 플레이트 콤팩터·진동기·믹서·래머·커터가 경유값이었음).
|
||||
FUEL_VARIABLES = {"경유": "oil_diesel", "휘발유": "oil_gasoline"}
|
||||
@@ -455,7 +455,9 @@ def load_regional_fuel_table(
|
||||
|
||||
|
||||
def load_fuel_price(
|
||||
oil_file: str = "oil_2026-08-14.json", region: str | None = None, kind: str = "경유"
|
||||
oil_file: str = "1_기초_유가_전국평균_오피넷_2026-08-14.json",
|
||||
region: str | None = None,
|
||||
kind: str = "경유",
|
||||
) -> tuple[Decimal, dict[str, str]]:
|
||||
"""경유 단가와 그 판의 신원. `region`(시도코드)을 주면 **그 지역 값**으로 선다.
|
||||
|
||||
@@ -490,7 +492,9 @@ def load_fuel_price(
|
||||
}
|
||||
|
||||
|
||||
def load_operator_wages(labor_file: str = "labor_const_2026-01-01.json") -> dict[str, Decimal]:
|
||||
def load_operator_wages(
|
||||
labor_file: str = "1_기초_노임_건설업_대한건설협회_2026-01-01.json",
|
||||
) -> dict[str, Decimal]:
|
||||
"""직종코드 → 일당."""
|
||||
records = _read_json(*_CATALOG_SUBPATH, labor_file)["variables"]["labor_rate"]["records"]
|
||||
return {
|
||||
@@ -513,7 +517,9 @@ LABOR_RELIABILITY_LABEL = {
|
||||
}
|
||||
|
||||
|
||||
def load_labor_reliability(labor_file: str = "labor_const_2026-01-01.json") -> dict[str, str]:
|
||||
def load_labor_reliability(
|
||||
labor_file: str = "1_기초_노임_건설업_대한건설협회_2026-01-01.json",
|
||||
) -> dict[str, str]:
|
||||
"""직종코드 → 신뢰도 기호(`*`·`**`). 정상 공표 직종은 아예 안 담는다."""
|
||||
records = _read_json(*_CATALOG_SUBPATH, labor_file)["variables"]["labor_rate"]["records"]
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user