- 정의 판 15(이력 판_14) — 흙막이 「흙막이」(형태 6 · 길이 · 높이 · 전 · 후) · 옹벽 「옹벽」(새 칸 wall_form 콘크리트 · 길이 · 높이 · 전 · 후) · 소단 「상세 내용」(소단 폭 · 소단 높이 새 칸) - 표 밖 옛 칸 = 표시 숨김(값 · 기본값 그대로) · 옹벽 옛 형식(form) 값 그대로 통과 · 흙막이 형태 B05 로 옮기며 필수 풂(옛 흙막이 저장 보호) - 흙막이 · 옹벽 길이 = 전 + 후 맞물림(solveSplit) · 숨긴 길이 · 전 · 후(소단)는 값만 쥐어 범위 · 저장 이어 씀 - 높이 = 좌측 칸 하나 · 횡단 그림이 따라감(독립 벽 조정창은 위치 전용 · 높이 줄 안 둠) - 시험 test_54_26_slope_table09 · 54-6 · 등록부 정책 시험 표 09 몫 맞춤 · ui_checks/54-26_사면안정_표09 - 남은 일: 검증 프로젝트(랩탑_보조) 심은 흙막이 · 소단 되돌림(restore 단계) · 사진 · 소단 높이는 계산에 아직 안 쓰임 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PSXsvyDxjNmufteN5bqmt
62 lines
2.2 KiB
Python
62 lines
2.2 KiB
Python
"""PLAN 54-6 — 사면안정(C군) 종류마다 컨테이너 「상세 내용」(정의 그룹) 하나.
|
|
|
|
· 기준 측점(측점 범위) 밖 옵션 전부를 담음 · 옵션 키 · 차례 그대로
|
|
· 잇기 = 그룹 id(`group_items`) — 종류 단위 잇기 줄은 가림(hidesTypeSummary = 그룹 있음)
|
|
"""
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from B05_Profile.B05_Profile_Structures_Schema import DEFINITION_PATH, load_structure_types
|
|
from M02_MasterTemplete.M02_Table_Fill import _with_group_items
|
|
from M02_MasterTemplete.StructOptions import M02_SO_Definition
|
|
from M02_MasterTemplete.StructOptions.M02_SO_Groups import groups_of
|
|
|
|
KINDS = {
|
|
"retaining_wall": "gretaindetail",
|
|
"masonry_wet": "gmasonwetdetail",
|
|
"masonry_dry": "gmasondrydetail",
|
|
"soil_guard": "gsoilgdetail",
|
|
"boulder_masonry": "gboulderdetail",
|
|
"berm": "gbermdetail",
|
|
}
|
|
TABLE_09 = {"soil_guard", "retaining_wall", "berm"}
|
|
|
|
|
|
def test_C군_종류마다_컨테이너_하나_옵션_전부():
|
|
types = [t for t in load_structure_types() if t.group == "C"]
|
|
assert sorted(t.type_id for t in types) == sorted(KINDS)
|
|
groups = groups_of()
|
|
for item in types:
|
|
if item.type_id in TABLE_09: # 표 09 로 바뀜 — test_54_26_slope_table09
|
|
continue
|
|
assert groups[item.type_id] == [
|
|
{
|
|
"id": KINDS[item.type_id],
|
|
"name": "상세 내용",
|
|
"options": [o.key for o in item.options],
|
|
}
|
|
]
|
|
|
|
|
|
def test_정의_검사_통과_판_이력():
|
|
doc = json.loads(Path(DEFINITION_PATH).read_text("utf-8"))
|
|
assert M02_SO_Definition.check(doc) == []
|
|
assert M02_SO_Definition.history_path(doc["판"] - 1).is_file()
|
|
|
|
|
|
def test_잇기는_컨테이너마다_집계_한_줄():
|
|
link = {"layer": "system", "owner": None, "key": "SS000001", "name": "옹벽"}
|
|
rows = _with_group_items(
|
|
[
|
|
{
|
|
"type_id": "retaining_wall",
|
|
"복사본": "s1",
|
|
"summary_item": None,
|
|
"group_items": {"gretaindetail": link},
|
|
}
|
|
]
|
|
)
|
|
assert [r["복사본"] for r in rows] == ["s1", "s1__gretaindetail"]
|
|
assert rows[1]["summary_item"] == link and rows[1]["그룹"] == "옹벽" # 표 09 컨테이너 이름
|