Skip to content

Fix regular expression used in NLCOMP test#4964

Merged
billsacks merged 6 commits into
ESMCI:masterfrom
mnlevy1981:fix_nlcomp
Apr 14, 2026
Merged

Fix regular expression used in NLCOMP test#4964
billsacks merged 6 commits into
ESMCI:masterfrom
mnlevy1981:fix_nlcomp

Conversation

@mnlevy1981
Copy link
Copy Markdown
Contributor

Need to capture cases when action is .G., .C., or .GC.; existing regex only caught the first two

Description

Checklist

  • My code follows the style guidelines of this project (black formatting)
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Need to capture cases when action is .G., .C., or .GC.; existing regex only
caught the first two
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.29%. Comparing base (a80e567) to head (c19d517).
⚠️ Report is 87 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

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

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

jedwards4b and others added 5 commits April 14, 2026 08:06
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
@mnlevy1981 mnlevy1981 requested a review from jedwards4b April 14, 2026 14:31
@billsacks billsacks merged commit 51cfec5 into ESMCI:master Apr 14, 2026
10 of 11 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.

NLCOMP failures in CESM test suite

3 participants