Skip to content

windytron: Add Moloka'i stations and omit gust when reported as zero. - #586

Merged
tavdog merged 2 commits into
mainfrom
add_molokai
Jul 13, 2026
Merged

windytron: Add Moloka'i stations and omit gust when reported as zero.#586
tavdog merged 2 commits into
mainfrom
add_molokai

Conversation

@tavdog

@tavdog tavdog commented Jul 13, 2026

Copy link
Copy Markdown
Member

Some stations report gust 0, which should display as average speed only rather than "avg g0".

tavdog and others added 2 commits July 13, 2026 14:09
Some stations report gust 0, which should display as average speed only rather than "avg g0".

Co-authored-by: Cursor <cursoragent@cursor.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +99 to +102
if wind_gust == 0:
wind_text = "%d %s" % (wind_avg, display_units)
else:
wind_text = "%dg%d %s" % (wind_avg, wind_gust, display_units)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
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)

@tavdog
tavdog merged commit 75495a4 into main Jul 13, 2026
6 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