diff --git a/resources/data_master_labels/labels_2026-01-01.json b/resources/data_master_labels/labels_2026-01-01.json index bf0f046d..4014b7ed 100644 --- a/resources/data_master_labels/labels_2026-01-01.json +++ b/resources/data_master_labels/labels_2026-01-01.json @@ -2,7 +2,7 @@ "schema_version": "1.0", "dataset_id": "data_master_labels", "effective_date": "2026-01-01", - "generated_at": "2026-09-16T15:44:59+09:00", + "generated_at": "2026-09-16T15:58:32+09:00", "note": "마스터 자료의 **사람이 읽을 이름표**. 값이 아니라 이름만 담는다 — 여기를 고쳐도 계산은 안 바뀐다. Z01 마스터 관리 화면이 표·열 이름을 여기서 읽는다.", "policy": { "labels_only": "값·수식·단가를 담지 않는다. 마스터 파일은 손대지 않는다.", @@ -54,6 +54,16 @@ "summary": "앞으로 늘려 갈 첫 벌. 모양을 잡아 두려고 먼저 놓은 것이다." } }, + "base_price_groups": { + "base_price": { + "name_ko": "기초단가", + "summary": "**얼마인가** — 때가 되면 갈아 끼우는 값(노임·기계·자재·유가·제비율)." + }, + "pumsem_basis": { + "name_ko": "품셈 기준", + "summary": "**얼마나 드나** — 품셈·법령이 정해 둔 계수와 갈래(토량환산·할증·거푸집·철근·돌쌓기 따위)." + } + }, "merged_tables": [ { "key": "labor", diff --git a/resources/tester/test_master_labels_base_prices.py b/resources/tester/test_master_labels_base_prices.py index 92a36288..67ec9b59 100644 --- a/resources/tester/test_master_labels_base_prices.py +++ b/resources/tester/test_master_labels_base_prices.py @@ -209,3 +209,30 @@ def test_축_칸은_못_고친다(): if axis in meta["editable"] and f"{kind}/{axis}" not in AXIS_ALSO_VALUE: bad.append(f"{kind}/{axis} 가 고칠 수 있는 칸으로 섰다") assert not bad, bad + + +def test_기초단가_상자_이름이_이름표에_있다(labels): + """⭐ 서버가 내는 갈래(`group`)마다 한글 이름이 있어야 화면이 영문으로 안 뜬다. + + 서버가 읽을 자리는 `labels["base_price_groups"][group]["name_ko"]` 다 — + 두 창이 서로 다른 자리를 보면 2026-09-15 의 26칸 사고가 되풀이된다. + """ + named = labels["base_price_groups"] + groups = {base_prices.kind_group(kind) for kind in base_prices.KINDS} + missing = groups - set(named) + assert not missing, f"이름표에 없는 갈래: {sorted(missing)}" + for key, entry in named.items(): + assert entry["name_ko"].strip(), key + assert entry["summary"].strip(), key + assert named["base_price"]["name_ko"] == "기초단가" + assert named["pumsem_basis"]["name_ko"] == "품셈 기준" + + +def test_상자마다_kind_가_있다(): + """빈 상자가 서면 화면에 이름만 뜨고 아무것도 안 열린다.""" + counted: dict[str, int] = {} + for entry in base_prices.kinds(): + counted[entry["group"]] = counted.get(entry["group"], 0) + 1 + assert entry["label"] != entry["kind"], f"{entry['kind']} 이름이 영문 그대로다" + assert entry["rows"] > 0, entry["kind"] + assert all(n > 0 for n in counted.values()), counted