feat: 오늘 날씨 점수 기준 강화 — 100점은 체감 21±0.5°·습도 45~55%·햇빛·바람 1m/s·초미세먼지 10 이하가 모두 맞을 때만
This commit is contained in:
1 parent
1fa0695c84
commit
76a640feab
3 files changed
+16
-4
No files matched your search
@@ -263,3 +263,14 @@ def test_new_gak_100_only_when_every_factor_is_perfect():
|
||||
perfect = dict(feels=19.5, wind=1.0, hum=35)
|
||||
assert _seed_score("golf", **perfect) == 100
|
||||
assert _seed_score("golf", day=_WED, **perfect) < 100
|
||||
|
||||
|
||||
def test_weather_score_100_only_on_perfect_day():
|
||||
from services.index_service import WEATHER_SCORE_DEF
|
||||
|
||||
perfect = Context(day=date(2026, 10, 2), is_holiday=False, pm25=8, air_label="좋음", moon=0, sunset_score=None, wind_warning=False, lookahead_rain_prob=0)
|
||||
hours = [_h(h, feels=21.0, prob=0, wind=0.8, hum=50, sunshine_ratio=1.0) for h in range(9, 22)]
|
||||
assert evaluate(WEATHER_SCORE_DEF, [hours], perfect).score == 100
|
||||
|
||||
good = [_h(h, feels=22.5, prob=10, wind=2.5, hum=62, sunshine_ratio=0.7) for h in range(9, 22)]
|
||||
assert evaluate(WEATHER_SCORE_DEF, [good], replace(perfect, pm25=15)).score < 95
|
||||
Reference in new issue
Block a user