[develop]: Add regression testing - #28
Conversation
…ent branch and latest commit
…is currently written to be run from that directory
…anch directory before running tests
…und by end-to-end test runs
…ed up test runs. Clean up logic to report if a test dir is not found in either baseline or new output
- Replace call to load_modules_wflow.sh with call to setup_conda.sh - Since we no longer have module loads, ROCOTO_PATH is provided as a variable in the machine file for each platform
… does this automatically
Read ROCOTO_PATH from the machine config file and prefix all calls to rocotorun and rocotostat with it, consistent with launch_vx_wflow.sh. Machines without ROCOTO_PATH (jet, noaacloud, linux, macos) fall back to bare binary names. rocoto_path is stored in the WE2E monitor YAML and propagated through update_expt_status/compare_rocotostat; added to all non-task entry skip lists to avoid being treated as a task. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The statuses loop in update_expt_status had 8-space indentation while the other two skip lists had 12-space indentation, so the replace_all edit missed it. This caused a TypeError when iterating over the expt dict since rocoto_path (a string) was not excluded from the task loop. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Resolve SCRIPT_DIR from ${BASH_SOURCE[0]} at the top and anchor all
relative file/directory references (conda_loc, conda/, environment.yml)
to it. Also replaces readlink -f with cd && pwd for macOS compatibility
without requiring GNU coreutils.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…p_conda.sh script
…ut files that were skipped or had no differences
…ng the rocoto exes
…write permissions set so multiple users can run tests in that area
…ent <native> tag for rocoto when submitting to the HPSS queue (just like how get_obs tasks already do)
mkavulich
left a comment
There was a problem hiding this comment.
Looks good, I have just a few comments/suggestions.
|
|
||
| The default behavior is to run the diff utility on all files in the dated subdirectories | ||
| under the output directory, because these are assumed to contain the actual MET output. | ||
| The `--diff_all_files` argument can be added to run the diff utility on all files in the output directory. |
There was a problem hiding this comment.
I'm a bit confused about the behavior of this flag. It seems like the SKIP_KEYWORDS files are still skipped even when this flag is enabled...is that the intended behavior? If so, I think this flag needs a better name, since it implies that all files will be diffed when active.
There was a problem hiding this comment.
It would also be nice if there was a flag to allow you to run a diff where it ignores missing test directories...for example, if you only run a subset of all tests, but still want to check them for success against the baseline.
There was a problem hiding this comment.
Regarding the --diff_all_files argument, I agree that it is a little misleading. The default behavior is to run the diff on each YYYYMMDDHH directory under each workflow directory, and the --diff_all_files argument runs the diff on each workflow directory, which will include some of the other files, like input files that are downloaded.
You are correct that the SKIP_KEYWORDS are still used if the flag is set or not. Excluding this list of skip keywords would result in a lot of misleading diffs being flagged in both configurations.
Any suggestions for improving this? Maybe the --diff_all_files argument is not really needed if we are only concerned with comparing the MET output? I added this option with the intention of being able to see if there are differences in the input files that could change at the source unexpectedly, which would explain the differences in the output. Maybe this is not a common occurrence and unnecessary to easily check?
There was a problem hiding this comment.
Regarding an option to run a subset of tests:
This is a good idea. I could add an optional --tests argument for the run_regression.py script to specify a subset of tests that could be passed to the run_we2e_tests.py script to tell it to run that subset. Currently it just calls it with --tests all.
A corresponding argument could be added to the run_diff.py script to determine which sub-directories (tests) to run the diff on. This would require pulling out the logic that parses the --tests argument in run_we2e_tests.py so it could be used by the run_diff.py script in the same way. Thoughts?
There was a problem hiding this comment.
With regards to the --diff_all_files option, I think renaming it to --diff_obs or --diff-input or something similar would suffice.
I think utilizing "tests" logic from run_we2e_tests.py sounds great.
There was a problem hiding this comment.
@mkavulich, I renamed the --diff_all_files argument to --diff_inputs to run_diff.py and added the --tests argument to run_regression.py to run a subset of tests by passing the value of the argument directly to run_we2e_tests.py.
I am working on updating the run_diff.py to take a --tests argument to run the diff logic on a subset of tests in another branch. These changes are a little more involved to share the functions to gather/check the e2e test names and isolate the vx_workflow and vx_diff dependencies, so I suggest that those changes be added to a separate PR. Does that sound good to you?
Co-authored-by: Michael Kavulich <kavulich@ucar.edu>
… script for clarity
… subset of tests (defaults to all tests)
mkavulich
left a comment
There was a problem hiding this comment.
Thanks for all your work on this
DESCRIPTION OF CHANGES:
Note: This PR contains changes from PR #25 to address some issues running the tests. Until that PR is merged, the differences in this PR only can be viewed from this link:
feature/fix_some_issues...feature/regression_tests
vx_diffwhich creates/activates the diff environment instead of thevx_workflowenvironmentAn example of the log file created by the diff script can be found on ursa:
/scratch3/BMC/dtc/George.Mccabe/dtc-vx-workflow_testing/diff_WE2E_20260630200405.txt
Type of change
TESTS CONDUCTED:
DEPENDENCIES:
DOCUMENTATION:
ISSUE:
CHECKLIST
LABELS (optional):
A Code Manager needs to add the following labels to this PR:
CONTRIBUTORS (optional):