Skip to content

BUG: fetch Windy forecasts from the official Point Forecast API - #1254

Merged
Gui-FernandesBR merged 5 commits into
developfrom
bug/windy-official-api
Dec 4, 2026
Merged

Gui-FernandesBR merged 5 commits into
developfrom
bug/windy-official-api

Conversation

@Gui-FernandesBR

Copy link
Copy Markdown
Member

Fixes the Windy part of #1247. The free endpoint behind type="Windy" now returns 404, so every call failed after about a minute of retries with an UnboundLocalError; forecasts now come from Windy's official Point Forecast API v2, which needs a key (api_key= or the WINDY_API_KEY environment variable, from https://api.windy.com/keys). That API serves GFS (now the default) and ICON-EU but not ECMWF, and has no pressure-level heights for ICON-Global, so those two raise an error pointing to the Open-Meteo equivalents. The response parsing is covered by unit tests with a mocked response, but the real API was not called because I have no key; the integration test is skipped unless a WINDY_API_KEY secret is set in CI.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XDW574tsj2yzaQ2JFZusEw

Gui-FernandesBR and others added 2 commits December 2, 2026 22:46
The free endpoint behind type="Windy" now returns 404, so every call failed
after a minute of retries with an UnboundLocalError. Forecasts now come from
Windy's Point Forecast API v2, which needs a key (api_key= or WINDY_API_KEY).
It serves GFS and ICON-EU; ECMWF and ICON raise an error pointing to Open-Meteo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDW574tsj2yzaQ2JFZusEw
@Gui-FernandesBR
Gui-FernandesBR requested a review from a team as a code owner December 3, 2026 01:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDW574tsj2yzaQ2JFZusEw
@codecov

codecov Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.33%. Comparing base (d3cf83a) to head (57a93a9).

Files with missing lines Patch % Lines
rocketpy/environment/fetchers/windy_fetcher.py 95.12% 2 Missing ⚠️
rocketpy/environment/environment.py 97.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1254      +/-   ##
===========================================
+ Coverage    87.03%   87.33%   +0.29%     
===========================================
  Files          130      130              
  Lines        18098    18161      +63     
===========================================
+ Hits         15752    15861     +109     
+ Misses        2346     2300      -46     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Gui-FernandesBR and others added 2 commits December 4, 2026 18:40
Raise ValueError for 200 bodies without a forecast and for non-object
error bodies, forward Windy's Testing-key warning, point 204 answers to
the model domain, and refuse launch dates outside the forecast instead
of using its first or last step. The fetcher also takes the key from
WINDY_API_KEY and model names in any case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDW577oY5VURzALuHrQtXL
… examples

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDW577oY5VURzALuHrQtXL
@Gui-FernandesBR
Gui-FernandesBR merged commit 48a9abe into develop Dec 4, 2026
9 checks passed
@Gui-FernandesBR
Gui-FernandesBR deleted the bug/windy-official-api branch December 4, 2026 23:15
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.

2 participants