Merge branch 'feature/weather-sky-snow-type'

This commit is contained in:
dasemu committed 2026-03-17 17:57:28 +01:00
commit 2e40eee95a
10 files changed
+128 -1

No files matched your search

+11 -1
View File
@@ -62,6 +62,7 @@ _WEATHER_COLUMNS: list[str] = [
"wind_direction_10m_dominant",
"relative_humidity_2m_mean",
"surface_pressure_mean",
"weather_code",
]
@@ -398,9 +399,10 @@ class SQLiteStore:
INSERT INTO {CURRENT_FORECASTS_TABLE} (
generated_at, run_hour, station_id, prediction_date,
open_probability, km_open, crowd_level,
sky_condition, snow_type,
weather_summary, rule_notes_json, prediction_source
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
""",
[
(
@@ -411,6 +413,8 @@ class SQLiteStore:
self._coerce_float(f.get("open_probability")),
self._coerce_float(f.get("km_open")),
f.get("crowd_level"),
f.get("sky_condition"),
f.get("snow_type"),
f.get("weather_summary"),
json.dumps(f.get("rule_notes") or [], ensure_ascii=False),
f.get("prediction_source"),
@@ -430,11 +434,13 @@ class SQLiteStore:
INSERT INTO {PAST_FORECASTS_TABLE} (
generated_at, run_hour, station_id, prediction_date,
open_probability, km_open, crowd_level,
sky_condition, snow_type,
weather_summary, rule_notes_json, prediction_source
)
SELECT
generated_at, run_hour, station_id, prediction_date,
open_probability, km_open, crowd_level,
sky_condition, snow_type,
weather_summary, rule_notes_json, prediction_source
FROM {CURRENT_FORECASTS_TABLE}
"""
@@ -735,6 +741,8 @@ class SQLiteStore:
open_probability REAL,
km_open REAL,
crowd_level TEXT,
sky_condition TEXT,
snow_type TEXT,
weather_summary TEXT,
rule_notes_json TEXT,
prediction_source TEXT
@@ -749,6 +757,8 @@ class SQLiteStore:
open_probability REAL,
km_open REAL,
crowd_level TEXT,
sky_condition TEXT,
snow_type TEXT,
weather_summary TEXT,
rule_notes_json TEXT,
prediction_source TEXT