Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #2665 diff_seeps #2668

Merged
merged 4 commits into from
Aug 23, 2023
Merged

Feature #2665 diff_seeps #2668

merged 4 commits into from
Aug 23, 2023

Conversation

JohnHalleyGotway
Copy link
Collaborator

Expected Differences

This PR fixes 2 things:

  1. I'd failed to list the 7 new columns of MODE CTS output in the 2 MET header table tables. This adds them.
  2. This updates the mode_conv.pl utility test code to process those 7 new columns.
  3. This adds SEEPS and SEEP_MPR lines to the test hdr table files for 11.0, 11.1, and 12.0.

This PR DOES NOT add support for diffing mtd output. Note that these changes are really just a bandaid. The better longterm solution is fully replacing this R/PERL diffing logic with a python implementation that already exists in part for METplus.

  • Do these changes introduce new tools, command line arguments, or configuration file options? [No]

    If yes, please describe:

  • Do these changes modify the structure of existing or add new output data types (e.g. statistic line types or NetCDF variables)? [No]

    If yes, please describe:

Pull Request Testing

  • Describe testing already performed for these changes:

Ran bin/comp_stat.sh script to test the following.

  1. SEEPS and SEEPS_MPR.
    Previously triggered this error:
COMPARING point_stat/point_stat_NCMET_NAM_NDAS_SEEPS_360000L_20120410_120000V.stat
file1: MET-develop-ref/test_output/point_stat/point_stat_NCMET_NAM_NDAS_SEEPS_360000L_20120410_120000V.stat
file2: MET-develop/test_output/point_stat/point_stat_NCMET_NAM_NDAS_SEEPS_360000L_20120410_120000V.stat
Error in read.table(strTmp, header = T) : more columns than column names
ERROR: compareStat() failed

With these changes, the diff passes:

stat1: NB20230822/MET-develop-ref/test_output/point_stat/point_stat_NCMET_NAM_NDAS_SEEPS_360000L_20120410_120000V_seeps.txt
stat2: NB20230822/MET-develop/test_output/point_stat/point_stat_NCMET_NAM_NDAS_SEEPS_360000L_20120410_120000V_seeps.txt

SUMMARY for non-bootstrap numerical values
# comparisons: 126
# differences: 0
  1. MODE CTS.
    Previously no differences were flagged because the 7 new columns were being ignored! Now we get this useful error message.
stat1: NB20230822/MET-develop-ref/test_output/mode/mode_CONFIG_MERGE_MOD_300000L_20120410_180000V_060000A_cts.txt
stat2: NB20230822/MET-develop/test_output/mode/mode_CONFIG_MERGE_300000L_20120410_180000V_060000A_cts.txt
ERROR: version 12_0 contains extra headers: LODDS ORSS EDS SEDS EDI SEDI BAGSS 
  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Hard to say. Review the code changes looking for typos. Overall the existing diffing logic isn't great. It "transforms" MODE data to make it look like STAT output lines. But this is a bit clumsy.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

  • Please complete this pull request review by [Aug 24, 2023].

Pull Request Checklist

See the METplus Workflow for details.

  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases or MET-X.Y.Z Development project for official releases
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

@JohnHalleyGotway JohnHalleyGotway added this to the MET 12.0.0 milestone Aug 23, 2023
Copy link
Collaborator

@jprestop jprestop left a comment

Choose a reason for hiding this comment

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

I reviewed the changes and didn't see any typos. Thanks for catching that the columns were being ignored for MODE CTS and for adding checks along with the useful message. Definitely an improvement! I approve this request.

Copy link
Collaborator

@jprestop jprestop left a comment

Choose a reason for hiding this comment

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

@JohnHalleyGotway Oops, I forgot to ensure that the tests passed. I see they are still running. I approve under the condition that the tests pass successfully. :)

@JohnHalleyGotway
Copy link
Collaborator Author

Thanks @jprestop. All the tests passed. I'm proceeding with the merge.

@JohnHalleyGotway JohnHalleyGotway merged commit 1990cfa into develop Aug 23, 2023
34 checks passed
@JohnHalleyGotway JohnHalleyGotway deleted the feature_2665_diff_seeps branch August 23, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

Update the unit test diff logic to handle SEEPS, SEEPS_MPR, and MODE CTS line type updates
2 participants