Merge origin/main into main-2: Open-Meteo 구름 20·100km·모델 2개 구조에 노을 하늘 상황 판정 맞춤

- 하늘 상황 판정·테스트를 구름 지점 2곳(20·100km), 모델 2개(JMA·ICON) 기준으로
- Open-Meteo 보조값 호출(fetch_weather)도 장애 대처(8초 끊기·2분 건너뛰기) 적용
- worker: 행사 수집 스케줄과 Open-Meteo 보조값 스케줄 둘 다 유지
- 지수 seed: main 의 한계 설명 + main-2 의 점수 구간 설명
- 옛 data-pipeline 문서는 삭제 유지, 내용은 openmeteo-data.md·데이터_흐름.html 에 반영
This commit is contained in:
minaChoi committed 2026-10-07 14:04:18 +09:00
commit 3f8f7daeb1
21 files changed
+1068 -111

No files matched your search

+26 -2
View File
@@ -101,8 +101,9 @@ class WeatherWarning(Base):
class CloudHourly(Base):
__tablename__ = "cloud_hourly"
lat: Mapped[Decimal] = mapped_column(Numeric(5, 2), primary_key=True)
lon: Mapped[Decimal] = mapped_column(Numeric(5, 2), primary_key=True)
region_code: Mapped[str] = mapped_column(String(10), primary_key=True)
kind: Mapped[int] = mapped_column(SmallInteger, primary_key=True)
distance_km: Mapped[int] = mapped_column(SmallInteger, primary_key=True)
forecast_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), primary_key=True)
model: Mapped[int] = mapped_column(SmallInteger, primary_key=True)
cloud_low: Mapped[int] = mapped_column(SmallInteger)
@@ -110,6 +111,23 @@ class CloudHourly(Base):
cloud_high: Mapped[int] = mapped_column(SmallInteger)
class OpenMeteoHourly(Base):
__tablename__ = "openmeteo_hourly"
region_code: Mapped[str] = mapped_column(String(10), primary_key=True)
forecast_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), primary_key=True)
uv_index: Mapped[Optional[Decimal]] = mapped_column(Numeric(4, 2), nullable=True)
uv_index_clear_sky: Mapped[Optional[Decimal]] = mapped_column(Numeric(4, 2), nullable=True)
visibility_m: Mapped[Optional[int]] = mapped_column(Integer, nullable=True)
wind_gust_ms: Mapped[Optional[Decimal]] = mapped_column(Numeric(4, 1), nullable=True)
pressure_hpa: Mapped[Optional[Decimal]] = mapped_column(Numeric(5, 1), nullable=True)
soil_temp_c: Mapped[Optional[Decimal]] = mapped_column(Numeric(4, 1), nullable=True)
sunshine_s: Mapped[Optional[int]] = mapped_column(SmallInteger, nullable=True)
shortwave_avg_wm2: Mapped[Optional[int]] = mapped_column(SmallInteger, nullable=True)
shortwave_max_wm2: Mapped[Optional[int]] = mapped_column(SmallInteger, nullable=True)
fetched_at: Mapped[datetime] = mapped_column(DateTime(timezone=True))
class SkyScore(Base):
__tablename__ = "sky_score"
@@ -156,6 +174,9 @@ class IndexDefinition(Base):
weight_wind: Mapped[int] = mapped_column(SmallInteger)
weight_humidity: Mapped[int] = mapped_column(SmallInteger)
weight_air: Mapped[int] = mapped_column(SmallInteger)
weight_uv: Mapped[int] = mapped_column(SmallInteger, default=0, server_default="0")
weight_sun: Mapped[int] = mapped_column(SmallInteger, default=0, server_default="0")
weight_view: Mapped[int] = mapped_column(SmallInteger, default=0, server_default="0")
weight_time: Mapped[int] = mapped_column(SmallInteger)
factor_rules: Mapped[dict] = mapped_column(JSONB)
zero_rules: Mapped[list] = mapped_column(JSONB)
@@ -177,6 +198,9 @@ class IndexScore(Base):
wind_score: Mapped[int] = mapped_column(SmallInteger)
humidity_score: Mapped[int] = mapped_column(SmallInteger)
air_score: Mapped[int] = mapped_column(SmallInteger)
uv_score: Mapped[int] = mapped_column(SmallInteger, default=0, server_default="0")
sun_score: Mapped[int] = mapped_column(SmallInteger, default=0, server_default="0")
view_score: Mapped[int] = mapped_column(SmallInteger, default=0, server_default="0")
time_score: Mapped[int] = mapped_column(SmallInteger)
zero_reason: Mapped[Optional[str]] = mapped_column(String(100), nullable=True)
notes: Mapped[dict] = mapped_column(JSONB)