-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add NHC tropical cyclone auto-posting #618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ee902a8
feat: add NHC tropical cyclone auto-posting
full-bars 89adc71
feat: add NHC IEMBot feed poller with botstalk fallback
full-bars 8d5f204
fix: add TWO PIL and restore valid JSON
full-bars ead6d5d
feat: add all NHC product types (TWO, TCE, TCP) to routing
full-bars 45d3dcd
feat: add NWWS ring buffer for debugging
full-bars 9376a67
fix: remove unused datetime imports from nwws
full-bars b7a7af8
feat: add /nwws_buffer debug command
full-bars dcd5a4a
fix: replace ring buffer with file-based product metadata log
full-bars b1cc54f
fix: tropical product posting crash and default channel
full-bars 50f820f
fix: correct swapped NHC product labels (TCP/TCV)
full-bars de3b77d
fix: bound tropical product summary and move full text to a thread
full-bars c277c2d
fix: Saffir-Simpson embed colors, proper emoji for TD/major hurricane
full-bars adafd82
fix: Saffir-Simpson scale with user-specified colors and emoji
full-bars 98ac94c
Merge remote-tracking branch 'origin/main' into feat/tropical
full-bars File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule .wiki
added at
869e0f
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,4 +24,5 @@ | |
| "cogs.verification", | ||
| "cogs.subscriptions", | ||
| "cogs.radar_history", | ||
| "cogs.tropical", | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
NWWS path passes the raw AFOS PIL as
pil_prefix, bypassing the product-name mapping the PR set out to fix.post_tropical_productusespil_prefix or _classify_product(product_id)for the display label — i.e. it expectspil_prefix, when supplied, to already be the resolved human-readable name (that's exactly whatroute_from_product_idincogs/tropical.pydoes:pil_prefix = _classify_product(product_id)). Herepil_prefixis set to the raw 3-letter code (e.g."TCP") and passed straight through, soproduct_typebecomes the literal string"TCP"instead of"ADVISORY". Every NWWS-sourced tropical post will show the raw PIL in its title/thread name, not the corrected label the CHANGELOG describes.🐛 Suggested fix — don't pass the raw PIL; let it resolve via `_classify_product`
elif any( afos_pil.startswith(x) for x in ("TCV", "TCD", "TWD", "TCU", "TWO", "TCE", "TCP") ): tropical_cog = self.bot.get_cog("Tropical") if tropical_cog: nhc_pils = ("TCV", "TCD", "TWD", "TCU", "TWO", "TCE", "TCP") pil_prefix = next(p for p in nhc_pils if afos_pil.startswith(p)) await tropical_cog.post_tropical_product( - product_id, raw_text, pil_prefix, source="NWWS" + product_id, raw_text, source="NWWS" ) logger.info(f"Triggered NHC {pil_prefix} via XMPP")📝 Committable suggestion
🤖 Prompt for AI Agents