[chore] solution,admin,ontology: 코드 주석을 한 줄로 — 히스토리 주석 삭제
여러 줄 주석이 설명보다 경위(예전·실측·지적)를 적고 있어 읽는 사람이 결론을 찾기 어려웠다. - ts·tsx·js·mjs·css·py 478개: 여러 줄 주석은 첫 문장 한 줄로, 과거형·날짜 문장은 삭제 - 주석 위치는 TypeScript 파서·파이썬 tokenize/ast 로 찾는다 — 문자열 안의 # · /* 는 건드리지 않는다 - eslint·ts·noqa·type: ignore 같은 지시 주석은 그대로 둔다 파이썬 275개 정리 전후 AST 동일, TS 298개 주석 뺀 토큰 동일(빈 JSX 주석 10곳만 차이). site·frontend·admin tsc, site vitest 105 passed Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c6908629f3
commit
11d30bb3d1
479 files changed
+3337
-13091
No files matched your search
@@ -1,9 +1,4 @@
|
||||
"""스냅샷의 일정이 payload 로 그대로 나가는가.
|
||||
|
||||
★ `site_payload._local` 은 **순수 함수**다(DB 도 파일도 안 건드린다). 그래서 여기서는
|
||||
스냅샷 dict 를 손으로 만들어 넣는다 — 발행본이 스냅샷과 다른 페이지가 되지 않게 하는
|
||||
그 원칙(`site_payload.to_site_payload` 머리주석)을 테스트도 같은 방식으로 따른다.
|
||||
"""
|
||||
"""스냅샷의 일정이 payload 로 그대로 나가는가."""
|
||||
from services.site_payload import _local
|
||||
|
||||
|
||||
@@ -17,8 +12,7 @@ def _course(name: str, duration: str) -> dict:
|
||||
|
||||
|
||||
def test_itineraries_pass_through_untouched():
|
||||
"""검증: 스냅샷에 일정이 있을 때.
|
||||
기대결과: payload.local.itineraries 로 모양 그대로 나간다 — 렌더러 계약을 여기서 바꾸지 않는다."""
|
||||
"""검증: 스냅샷에 일정이 있을 때."""
|
||||
snapshot_local = {
|
||||
"region_code": "52군산시",
|
||||
"contents": [],
|
||||
@@ -31,31 +25,26 @@ def test_itineraries_pass_through_untouched():
|
||||
|
||||
|
||||
def test_no_itineraries_key_when_empty():
|
||||
"""검증: 일정이 없을 때.
|
||||
기대결과: 키를 만들지 않는다 — 렌더러는 없는 필드를 무시하고, 빈 배열은 '만들었는데 비었다'로 읽힌다."""
|
||||
"""검증: 일정이 없을 때."""
|
||||
local, _synced = _local({"region_code": "52군산시", "contents": [], "itineraries": []}, 35.98, 126.70)
|
||||
assert "itineraries" not in local
|
||||
|
||||
|
||||
def test_old_snapshot_without_the_key_does_not_break():
|
||||
"""검증: 이 기능 전에 구운 스냅샷(키가 아예 없다).
|
||||
기대결과: 빈 채로 지나간다 — 다음 빌드에서 채워진다."""
|
||||
"""검증: 이 기능 전에 구운 스냅샷(키가 아예 없다)."""
|
||||
local, _synced = _local({"region_code": "52군산시", "contents": []}, 35.98, 126.70)
|
||||
assert "itineraries" not in local
|
||||
|
||||
|
||||
def test_non_dict_entries_are_dropped():
|
||||
"""검증: body 에 dict 가 아닌 것이 섞였을 때.
|
||||
기대결과: 그것만 버리고 나머지는 살린다."""
|
||||
"""검증: body 에 dict 가 아닌 것이 섞였을 때."""
|
||||
snapshot_local = {"contents": [], "itineraries": [_course("코스A", "1박 2일"), "깨진 값", None]}
|
||||
local, _synced = _local(snapshot_local, 35.98, 126.70)
|
||||
assert [i["name"] for i in local["itineraries"]] == ["코스A"]
|
||||
|
||||
|
||||
def test_distance_based_algorithm_is_not_used_anymore():
|
||||
"""검증: 좌표와 주변 관광지·맛집이 있어도 알고리즘 일정이 끼지 않는다.
|
||||
기대결과: 스냅샷의 itineraries 만 나간다 — services/itinerary.py 는 잠시 쓰지 않는다
|
||||
(2026-09-11 결정). 되살릴 때 이 테스트를 함께 고친다."""
|
||||
"""검증: 좌표와 주변 관광지·맛집이 있어도 알고리즘 일정이 끼지 않는다."""
|
||||
snapshot_local = {
|
||||
"contents": [
|
||||
{"content_type": 3, "title": "관광지", "latitude": 35.99, "longitude": 126.71,
|
||||
|
||||
Reference in new issue
Block a user