fix: PNS max EF rating truncated at first tornado's && delimiter#620
Merged
Conversation
_handle_pns stopped searching for EF ratings at the first "&&" marker, meant to strip the trailing EF Scale legend. But "&&" also separates every individual tornado entry in multi-tornado damage survey PNS products, so only the first tornado's rating was ever considered. Confirmed live against KPBZ's July 21 2026 event, which reported "Max: EF0" despite containing an EF1 tornado later in the same product.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PNS handler no longer treats ChangesPNS EF rating parsing
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
_handle_pnstruncated its EF-rating search text at the first&&marker, intending to strip the trailing "EF Scale" legend boilerplate. But NWS damage survey PNS products also use&&to separate every individual tornado entry within the product, so on any survey with more than one tornado only the first tornado's rating was ever considered.202607232205-KPBZ-NOUS41-PNSPBZ) reported "Max: EF0" despite containing a later EF1 tornado (Zanesville 1, Muskingum County, OH).EF SCALE:/THE ENHANCED FUJITA SCALE, which unambiguously mark the trailing legend — leave every&&-delimited tornado entry intact for rating extraction.Test plan
&&-delimited, multi-tornado structure; verified it fails against the pre-fix code (assertsMax: EF0was wrongly produced) and passes with the fix (Max: EF1)venv/bin/python3 -m pytest tests/test_reports.py tests/test_surveys.py -q— 20 passedSummary by CodeRabbit