fix: 노을 결론이 공기(가시거리·습도)로 깎인 점수와 어긋나던 것 — 공기 보정 0.7배 미만이면 결론 한 단계 낮추고 이유 표시, 피드 노을 카드 점수 크게, 예보 기준 시각 표시

This commit is contained in:
minaChoi committed 2026-10-12 09:36:12 +09:00
1 parent f4fe3e965c
commit 0a98fb8879
10 files changed
+67 -17

No files matched your search

+4 -3
View File
@@ -28,7 +28,7 @@ from services.air_service import pm10_grade, pm25_grade
from services.calc.day_slot import NIGHT_AFTER_SUNSET, slot_of
from services.calc.index_calc import rank_score
from services.calc.moon import MoonNight, nearest, night, view_line
from services.calc.sky_score import GRADE_LABEL, SITUATION_LINE
from services.calc.sky_score import GRADE_LABEL, SITUATION_LINE, air_note
from services.calc.sun import sun_times
from services.hero_stats import UV_HIGH, HeroInput, hero_stats, uv_label
from services.index_service import IndexBoard, IndexItem, IndexService
@@ -663,7 +663,8 @@ class FeedService:
target, when, rise = plan.target, plan.when, plan.kind is SkyType.SUNRISE
word, icon = ("일출", "sun") if rise else ("노을", "sunset")
sit = SkySituation(target.situation) if target.situation else None
line = SITUATION_LINE[sit] if sit else GRADE_LABEL[SkyGrade(target.grade)]
# 공기가 뿌예 결론이 낮아졌으면 그 이유를, 아니면 하늘 상황을
line = "공기가 뿌예 색이 흐려요" if air_note(target.air) else SITUATION_LINE[sit] if sit else GRADE_LABEL[SkyGrade(target.grade)]
better = plan.outlook
sun = next((b for b in target.best_times if b["kind"] == "sun"), target.best_times[0])
sun_at = datetime.fromisoformat(sun["at"]).astimezone(KST)
@@ -672,7 +673,7 @@ class FeedService:
slides=[], share_messages=[f"{when} {word}은 쉬어요, {line}"])
cuts = [Cut(**b) for b in target.best_times if b["kind"] != "peak"]
slides = [SunsetSlide(kind="sunset", eyebrow=f"{when} {word} · {c.region.name}", line=line, score=target.score,
grade_label=line, cuts=cuts, situation=sit)]
grade_label=GRADE_LABEL[SkyGrade(target.grade)], cuts=cuts, situation=sit)]
if c.sky.spots and not rise:
slides.append(RowsSlide(kind="rows", eyebrow="가까운 노을 명소", line=f"해 지는 {compass(c.sky.sunset_azimuth)}쪽", icon="sunset",
rows=[Row(label=f"{n + 1} {x.spot.name}", value=f"{compass(x.direction)} {x.distance_km}km", place=x.spot.name) for n, x in enumerate(c.sky.spots)]))