thermograph/data
Emi Griffith 30153dbc64 Flip history primary to NASA POWER, Open-Meteo to fallback
The live history path now tries NASA POWER first (keyless, independent of
Open-Meteo) and falls back to the Open-Meteo archive only when NASA is
unavailable — the reverse of before. Gusts NASA lacks are filled from Meteostat
inside _fetch_history_nasa (added in the prior change). Both sources must still
return a plausibly-full span (MIN_ARCHIVE_DAYS) before being cached as complete;
a short/partial response is rejected and the other source is tried.

_fetch_history_nasa now accepts a start/end range so it also serves the recent
tail top-up: _topup_tail fetches NASA-first via the new _fetch_history_tail
helper (Open-Meteo range as fallback, skipped during its rate-limit cooldown),
removing the last per-active-cell Open-Meteo call from the history path. The
Open-Meteo cooldown no longer gates the top-up, since NASA is not subject to it.

Open-Meteo remains wired as the fallback (deletion is a later step). Tests
updated to the new source order plus tail-fetch coverage.
2026-07-22 22:02:30 -07:00
..
__init__.py Split the backend into domain packages (#217) 2026-07-20 05:31:03 +00:00
cities.py Split the backend into domain packages (#217) 2026-07-20 05:31:03 +00:00
city_events.py Split the backend into domain packages (#217) 2026-07-20 05:31:03 +00:00
climate.py Flip history primary to NASA POWER, Open-Meteo to fallback 2026-07-22 22:02:30 -07:00
climate_store.py Repo-split Stage 1: sever web/'s reverse imports (#9) 2026-07-21 16:09:35 +00:00
grading.py Port e77460e Plain-language weather insight sentences (backend half) from monorepo (drift reconciliation) 2026-07-22 12:08:24 -07:00
grid.py Split the backend into domain packages (#217) 2026-07-20 05:31:03 +00:00
meteostat.py Add Meteostat gust supplier for the gust-less backup sources 2026-07-22 21:39:09 -07:00
places.py Move forward geocoding off Open-Meteo to local index + Nominatim 2026-07-22 21:29:26 -07:00
scoring.py Score every metric equally in the overall total (#218) 2026-07-20 05:45:57 +00:00
store.py Containerize the app and move the databases to PostgreSQL 18 (#220) 2026-07-20 06:28:23 +00:00