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. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| cities.py | ||
| city_events.py | ||
| climate.py | ||
| climate_store.py | ||
| grading.py | ||
| grid.py | ||
| meteostat.py | ||
| places.py | ||
| scoring.py | ||
| store.py | ||