Fix regular expression used in NLCOMP test#4964
Merged
Merged
Conversation
Need to capture cases when action is .G., .C., or .GC.; existing regex only caught the first two
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4964 +/- ##
==========================================
- Coverage 31.49% 28.29% -3.20%
==========================================
Files 264 262 -2
Lines 38869 38390 -479
Branches 8254 8126 -128
==========================================
- Hits 12242 10863 -1379
- Misses 25388 26279 +891
- Partials 1239 1248 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jedwards4b
requested changes
Apr 13, 2026
Contributor
jedwards4b
left a comment
There was a problem hiding this comment.
Can you please add some doctests to this PR. Something like:
>>> _normalize_string_value("ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.G.20260410_135953_nhg5ae","ERS.TL319_t232.G1850MARBL_JRA.derecho_intel")
ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.ACTION.TESTID
>>> _normalize_string_value("ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.GC.20260410_135953_nhg5ae","ERS.TL319_t232.G1850MARBL_JRA.derecho_intel")
ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.ACTION.TESTID
>>> _normalize_string_value("ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.C.20260410_135953_nhg5ae","ERS.TL319_t232.G1850MARBL_JRA.derecho_intel")
ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.ACTION.TESTID
>>> _normalize_string_value("ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.GG.20260410_135953_nhg5ae","ERS.TL319_t232.G1850MARBL_JRA.derecho_intel")
ERS.TL319_t232.G1850MARBL_JRA.derecho_intel.GG.20260410_135953_nhg5ae
CIME/tests/test_simple_compare.py only tests _normalize_string_value; I verified that the test failed with the bad regular expression and passes with the modifications in this PR
Test a few cases where we expect _normalize_string_value() to return the original string
jedwards4b
approved these changes
Apr 14, 2026
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.
Need to capture cases when action is .G., .C., or .GC.; existing regex only caught the first two
Description
Checklist