Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #175 +/- ##
===========================================
+ Coverage 61.02% 61.42% +0.40%
===========================================
Files 309 309
Lines 11732 11723 -9
Branches 1035 1019 -16
===========================================
+ Hits 7159 7201 +42
+ Misses 4573 4522 -51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
52d2b41 to
618ac13
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends metkit::ParamID::normalise() with an additional optional boolean parameter, allowing callers to explicitly select an alternate normalisation path (previously only enabled via the useGRIBParamID resource).
Changes:
- Adds a new optional parameter to
ParamID::normalise()’s signature. - Switches the normalisation branch condition to
useGRIBParamID || useParamIdto allow explicit caller override.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/metkit/mars/ParamID.h
Outdated
| static void normalise(const REQUEST_T& r, std::vector<Param>& req, const AXIS_T& axis, bool& windConversion, | ||
| bool fullTableDropping = ParamID::fullTableDropping()); | ||
| bool fullTableDropping = ParamID::fullTableDropping(), bool useParamId = false); |
There was a problem hiding this comment.
The new boolean parameter useParamId doesn’t match the PR description (“strict behavior”) and is also ambiguous vs the existing useGRIBParamID resource. Consider renaming this parameter to reflect the behavioral intent (e.g., strict/strictNormalisation or forceGRIBParamID) and documenting what behavior changes when it is enabled.
src/metkit/mars/ParamID.h
Outdated
| if (useGRIBParamID || useParamId) { | ||
|
|
There was a problem hiding this comment.
useParamId forces the useGRIBParamID branch (if (useGRIBParamID || useParamId)), but the debug logging inside this branch still labels the mode as useGRIBParamID. If this flag is intended for callers to request a different/stricter behavior, the logging (and possibly the condition naming) should be updated so diagnostics clearly reflect which mode is active.
src/metkit/mars/ParamID.h
Outdated
| if (useGRIBParamID || useParamId) { | ||
|
|
There was a problem hiding this comment.
This change introduces a new normalization mode controllable via useParamId, but there are existing unit tests for ParamID::normalise (e.g., tests/test_param_axis.cc) and none currently exercise the new flag. Please add/extend tests to cover the behavior when useParamId=true (especially when the useGRIBParamID resource is false) to prevent regressions.
72186b2 to
067b6ab
Compare
067b6ab to
37662f2
Compare
Description
METK-161 added optional parameter to ParamID::normalise to request strict behavior
Contributor Declaration
By opening this pull request, I affirm the following: