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:
2026-09-19 19:09:02 +09:00
co-authored by Claude Sonnet 5
parent cbb60ecb6e
commit ebd148c4e6
37 changed files with 109 additions and 84 deletions
@@ -23,7 +23,11 @@ from B09_Estimation.B09_Estimation_MachineOperating import FUEL_VARIABLES, load_
from Z01_MasterData.Z01_MasterData_Tables import RESOURCES
#: B09 셈이 여는 원본 셋 — 바뀌면 캐시를 새로 읽음
_INPUT_FILES = ("mach_base_2026.json", "pum_const_2026.json", "labor_const_2026-01-01.json")
_INPUT_FILES = (
"3_품셈_건설_기계경비기준_8장_2026-01-01.json",
"3_품셈_건설_표전체_2026-01-01.json",
"1_기초_노임_건설업_대한건설협회_2026-01-01.json",
)
EDITABLE = ["price_thousand_krw", "loss_coefficient_per_hour"]
COMPUTED = ("hourly_loss_krw", "hourly_fuel_krw", "hourly_operator_krw", "hourly_total_krw")
#: 조종원 식 글자 — B09 식 문자열(좌→우 차례)을 사람이 읽게만 바꿈
@@ -90,7 +94,7 @@ def _cached(_mtimes: tuple[int, ...]):
def _inputs():
folder = RESOURCES / "data_cost_input_value"
folder = RESOURCES / "master_data" / "old"
return _cached(tuple((folder / name).stat().st_mtime_ns for name in _INPUT_FILES))
+2 -2
View File
@@ -19,7 +19,7 @@ from typing import Any
ROOT = Path(__file__).resolve().parent.parent
RESOURCES = ROOT / "resources"
LABEL_DIR = RESOURCES / "data_master_labels"
LABEL_DIR = RESOURCES / "master_data" / "old"
DEFAULT_PAGE_SIZE = 50
MAX_PAGE_SIZE = 500
ROW_KEY = "@key"
@@ -132,7 +132,7 @@ def _labels_at(path: str, _mtime_ns: int) -> dict[str, Any]:
def load_labels() -> dict[str, Any]:
"""이름표 끝 판(이름 차례) — 없으면 빈 이름표(파일도 안 보임)."""
found = sorted(LABEL_DIR.glob("labels_*.json")) if LABEL_DIR.is_dir() else []
found = sorted(LABEL_DIR.glob("4_화면_이름표_*.json")) if LABEL_DIR.is_dir() else []
if not found:
return {"kinds": {}, "files": [], "columns": {}, "column_overrides": {}}
return _labels_at(str(found[-1]), found[-1].stat().st_mtime_ns)
+3 -3
View File
@@ -24,7 +24,7 @@ SOURCE_OF = {
"work_item_forest": "pum_forest",
"work_item_const": "pum_const",
} # 이름표 `work_item_axis` 와 같은 이름
FOLDER = tables.RESOURCES / "data_work_item_master"
FOLDER = tables.RESOURCES / "master_data" / "old"
#: 불변 열쇠 칸 — ⚠ 데스크탑 서브 자료가 오면 칸 이름을 맞출 것(여기 한 곳)
KEY_FIELD = "work_item_key"
PATH_JOIN = " "
@@ -127,7 +127,7 @@ def base_rows(kind: str) -> list[dict[str, Any]]:
return rows
LINK_FOLDER = tables.RESOURCES / "data_work_item_link"
LINK_FOLDER = tables.RESOURCES / "master_data" / "old"
LINKED = "연결됨"
@@ -136,7 +136,7 @@ def linked_keys() -> frozenset[str]:
⚠ 목록을 코드에 안 둠 — 판정은 그 표 · 미판정은 안 이음(표의 `unconfirmed_action: do_not_link`).
"""
found = sorted(LINK_FOLDER.glob("work_item_link_*.json")) if LINK_FOLDER.is_dir() else []
found = sorted(LINK_FOLDER.glob("2_공종_산림건설_연결_*.json")) if LINK_FOLDER.is_dir() else []
if not found:
return frozenset()
links = _read(str(found[-1]), found[-1].stat().st_mtime_ns).get("links") or []