fix(765-6): 초기값 사본 · 복원에서 예상노선(공유) 뺌 — 수치지형도 벌 [초기화]가 라이다 예상노선을 덮던 것
- 검증_sub5 실측: 칩으로 수치지형도 벌 → [초기화] → 칩 라이다 뒤 예상노선이 수치지형도로 자른 것(643 점 · 2136.2 m)으로 남음 · 라이다로 자른 것 = 415 점 · 1377.4 m - 예상노선은 지형마다 벌이 있어도 하나(공유 · 추천이 씀) — 초기값 사본에 안 넣고 복원이 안 건드림(옛 사본 안 것도 건너뜀) - 시험 test_765_design_sets 에 덮지 않음 검사 덧 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -172,7 +172,9 @@ def _copy_tree(source: Path, target: Path) -> None:
|
||||
#: 트리 안 공유 캐시(이름 앞머리) — 사본에 안 넣고 복원이 안 지움(765-6 · 지우면 다음 셈이 처음부터)
|
||||
_TREE_CACHES = {
|
||||
"B04_PreProcess/drainage": DRAINAGE_SHARED_PREFIXES,
|
||||
"B05_Profile/route": ("cost_surface_",), # 추천 비용면
|
||||
# 추천 비용면 · 예상노선(공유 — 지형마다 벌이 있어도 하나 · 765 · 수치지형도 벌 [초기화]가
|
||||
# 라이다 예상노선을 덮던 것)
|
||||
"B05_Profile/route": ("cost_surface_", "expected_route"),
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -569,19 +569,21 @@ def test_복제가_묶음_안_지표면_id_고침(tmp_path: Path) -> None:
|
||||
assert sets.bundle_ready(tmp_path, "las", FP) # 지문은 id 를 안 봄
|
||||
|
||||
|
||||
def test_초기값_사본은_비용면도_빼고_복원이_안_지움(tmp_path: Path) -> None:
|
||||
def test_초기값_사본은_비용면_예상노선도_빼고_복원이_안_건드림(tmp_path: Path) -> None:
|
||||
from common_util import common_util_initial_snapshot as snap
|
||||
|
||||
_seed_files(tmp_path)
|
||||
asyncio.run(_save(snap, tmp_path))
|
||||
stored = tmp_path / "initial_snapshot" / "B05_Profile__route"
|
||||
assert not any(p.name.startswith("cost_surface_") for p in stored.iterdir())
|
||||
assert (stored / "expected_route.csv").is_file() # 예상노선은 그대로 뜸
|
||||
assert not any(p.name.startswith(("cost_surface_", "expected_route")) for p in stored.iterdir())
|
||||
route = tmp_path / "B05_Profile" / "route"
|
||||
(route / "cost_surface_x_implicit.npz").write_text("c2", encoding="utf-8")
|
||||
(route / "plus_stations.json").write_text("[]", encoding="utf-8")
|
||||
(route / "expected_route.csv").write_text("other-terrain", encoding="utf-8")
|
||||
snap.restore_snapshot_files(tmp_path)
|
||||
assert (route / "cost_surface_x_implicit.npz").read_text(encoding="utf-8") == "c2"
|
||||
# 예상노선 = 공유 — 다른 벌 [초기화]가 덮지 않음
|
||||
assert (route / "expected_route.csv").read_text(encoding="utf-8") == "other-terrain"
|
||||
assert not (route / "plus_stations.json").exists() # 초기값에 없던 설계 파일 = 지움
|
||||
assert (route / "structures.json").read_text(encoding="utf-8") == '{"items": [1]}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user