Closed JohnHalleyGotway closed 1 month ago
Thanks for taking a look @georgemccabe. I did just find/address a "false positive" match in the is_vector_dir_stat()
function.
As for the diffs, yes, the rather brittle diff logic fails when the number of columns differ. Rather than enhancing the existing Rscript diff logic, I'd rather switch over to the Python-based one used by METplus soon.
@bikegeek, FYI, I documented the METplus-Analysis impacts with dtcenter/METdataio#307 and dtcenter/METcalcpy#384.
Expected Differences
[x] Do these changes introduce new tools, command line arguments, or configuration file options? [No] If yes, please describe:
[x] Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [Yes] If yes, please describe:
This PR adds the
TOTAL_DIR
column to the VL1L2, VAL1L2, and VCNT line types. It adds this column BEFORE all the stats previously added for #2395. Since these new stats have not been included in a public release, adding this in the current "middle" of the line type is fine. It also updates Stat-Analysis to use those counts when aggregating the stats from those line types that begin withDIR_
.Pull Request Testing
The code for this feature branch is compiled as the
met_test
user inseneca:/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-feature_2395_TOTAL_DIR
.Tested aggregating VL1L2 lines:
Input:
Output:
And these are the correct weighted averages.
Tested printing summaries of these columns.
And it's parse the correct values from the correct columns.
The code for this feature branch is compiled as the
met_test
user inseneca:/d1/projects/MET/MET_pull_requests/met-12.0.0/beta5/MET-feature_2395_TOTAL_DIR
.Please review code changes, doc updates, and test as you see fit.
Updated the tables to describe the output line types.
I added to new jobs to an existing Stat-Analysis config file to demonstrate the processing of VL1L2 lines. This generates 2 new output files:
Differences are flagged in all VCNT, VL1L2, and VAL1L2 output lines.
I downloaded and inspected the diff and log artifacts from the GHA run.
.stat
files and 34.txt
files.I ran the commands listed below to confirm that all these diffs are limited to the VCNT, VL1L2, and VAL1L2 line types:
Here's the result:
Differences are flagged in all VCNT, VL1L2, and VAL1L2 output lines. See this dtcenter/METplus#2592 issue to update the truth data.
The SonarQube quality gate flag failed in this run with 0 new bugs but 7 new code smells.
I did modify the code to address 4 of the 7 ones flagged (
Global variables should be const.
andAdd the "static" storage specifier to this declaration
).But chose not to address the other 3 (
Extract the assignment from this expression.
andRefactor this function to reduce its Cognitive Complexity from XX to the 25 allowed.
)Pull Request Checklist
See the METplus Workflow for details.