Skip to content

fix metno caching and dpird old vs new schema#103

Merged
bozaah merged 2 commits intomainfrom
fix_mix_schema
Apr 5, 2026
Merged

fix metno caching and dpird old vs new schema#103
bozaah merged 2 commits intomainfrom
fix_mix_schema

Conversation

@bozaah
Copy link
Copy Markdown
Collaborator

@bozaah bozaah commented Mar 31, 2026

This pull request adds caching and conditional revalidation for MET Norway (MET.NO) weather forecast API calls. It introduces new options to control cache usage, cache directory, and fallback to stale data on rate limits.

MET Norway forecast caching and updates:

  • Added session-scoped caching to get_metno_forecast() and get_metno_daily_forecast(). Also added conditional revalidation using response headers (If-Modified-Since and handling of HTTP 304 Not Modified and 429 rate limit). Added new arguments use_cache, cache_dir, and allow_stale_on_error to MET.NO functions.

Bug fixes:

  • Fixed .parse_summary() to combine paginated get_dpird_summaries() responses with mixed schemas, filling missing fields with NA instead of erroring during row binding.

Documentation updates:

  • Updated NEWS.md and documentation to describe the new caching features, wind data structure changes, and improvements to the MET Norway forecast integration.

@bozaah bozaah merged commit 94d9d10 into main Apr 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant