Skip to content

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

Open
Gui-FernandesBR wants to merge 3 commits into
developfrom
bug/windy-official-api
Open

Gui-FernandesBR wants to merge 3 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 90.16393% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.30%. Comparing base (d3cf83a) to head (f61bd54).

Files with missing lines Patch % Lines
rocketpy/environment/fetchers/windy_fetcher.py 82.60% 4 Missing ⚠️
rocketpy/environment/environment.py 94.73% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1254      +/-   ##
===========================================
+ Coverage    87.03%   87.30%   +0.26%     
===========================================
  Files          130      130              
  Lines        18098    18141      +43     
===========================================
+ Hits         15752    15838      +86     
+ Misses        2346     2303      -43     

☔ 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.

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