windytron: Add Moloka'i stations and omit gust when reported as zero. - #586
Conversation
Some stations report gust 0, which should display as average speed only rather than "avg g0". Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Code Review
This pull request adds new stations to the Windytron lookup and conditionally formats the wind text to omit gust speed when it is zero. The reviewer suggested improving this logic by omitting the gust speed whenever it is less than or equal to the average wind speed to prevent displaying nonsensical values.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if wind_gust == 0: | ||
| wind_text = "%d %s" % (wind_avg, display_units) | ||
| else: | ||
| wind_text = "%dg%d %s" % (wind_avg, wind_gust, display_units) |
There was a problem hiding this comment.
A gust speed should only be displayed if it is strictly greater than the average wind speed. If a station reports a gust speed that is less than or equal to the average wind speed (including 0), it should be omitted to avoid displaying nonsensical values like 15g12.
| if wind_gust == 0: | |
| wind_text = "%d %s" % (wind_avg, display_units) | |
| else: | |
| wind_text = "%dg%d %s" % (wind_avg, wind_gust, display_units) | |
| if wind_gust <= wind_avg: | |
| wind_text = "%d %s" % (wind_avg, display_units) | |
| else: | |
| wind_text = "%dg%d %s" % (wind_avg, wind_gust, display_units) |
Some stations report gust 0, which should display as average speed only rather than "avg g0".