Skip to content

[develop]: Regression test improvements#39

Open
georgemccabe wants to merge 90 commits into
developfrom
feature/we2e_test_from_any_dir
Open

[develop]: Regression test improvements#39
georgemccabe wants to merge 90 commits into
developfrom
feature/we2e_test_from_any_dir

Conversation

@georgemccabe

@georgemccabe georgemccabe commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

DESCRIPTION OF CHANGES:

  • Moved logic to parse --tests argument of run_we2e_tests.py into python_utils so that it can be used by the run_diff.py regression test script to determine which subdirectories to diff
  • Added unit tests for --tests argument parsing (identified unsupported inputs that could be added later)
  • Updated regression test scripts to support --tests argument to run a subset of tests and diff a subset of tests (reports failure if requested test was not generated by either run)
  • Updated run_we2e_tests.py script so that it can be run from any directory instead of just the tests/WE2E directory (allows log outputs to be written to more appropriate location when running via regression test scripts
  • Moved jinja2 imports in python_utils (metplus_conf_utils.py and config_parser.py) into functions that use them so that the entire python_utils module can be imported and functions that don't require jinja2 can be called without the dependency
  • Renamed run_diff.py argument --baseline to --baseline_dir to differentiate from the `run_regression.py argument (one says to run tests on the baseline commit while the other overrides the location of the baseline data)
  • Fixed bug in run_regression.py script where --tests argument cannot take more than 1 input value (list of tests)
  • Fixed this PR template that hides a header
  • Fixed bug in logic to get merge commit of PR to run regression tests
  • add ush to the python path in the pylint config file so PYTHONPATH doesn't need to be set when calling pylint

Type of change

  • New feature (non-breaking change which adds functionality)

TESTS CONDUCTED:

  • derecho
  • hera
  • hercules
  • orion
  • ursa
  • other (describe)

On Ursa

Ran regression test on this PR (39)

python3 ./tests/regression/run_regression.py --pr 39 --account dtc --machine ursa

Log files:

  • /scratch3/BMC/dtc/dtc-vx-workflow_testing/pr_39/output.8cf8a84/nohup.out
  • /scratch3/BMC/dtc/dtc-vx-workflow_testing/pr_39/output.8cf8a84/WE2E_summary_20260721020903.txt
  • /scratch3/BMC/dtc/dtc-vx-workflow_testing/pr_39/output.8cf8a84/WE2E_tests_20260720214219.yaml

Ran diff logic comparing PR 39 to baseline (feature/regression_tests/output.827a3e8)

test_dir=/scratch3/BMC/dtc/dtc-vx-workflow_testing/pr_39/output.8cf8a84
cd dtc-vx-workflow  # under my area using this branch
source ./setup_conda.sh vx_diff
python3 ./tests/regression/run_diff.py ${test_dir}

No difference were found

See log file for details: /scratch3/BMC/dtc/dtc-vx-workflow_testing/diff_WE2E_20260721190007.txt

Ran diff logic comparing same test output but only running the diff on a subset of tests (ensemble)

python3 ./tests/regression/run_diff.py ${test_dir} --tests ensemble

/scratch3/BMC/dtc/dtc-vx-workflow_testing/diff_WE2E_20260721201839.txt

DEPENDENCIES:

None

DOCUMENTATION:

ISSUE:

LABELS (optional):

A Code Manager needs to add the following labels to this PR:

  • Work in progress
  • bug
  • documentation
  • enhancement
  • help wanted
  • high priority

CONTRIBUTORS (optional):

georgemccabe and others added 30 commits May 28, 2026 10:29
…is currently written to be run from that directory
…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
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>
georgemccabe and others added 25 commits June 30, 2026 15:13
…write permissions set so multiple users can run tests in that area
…efactor to reduce duplication and cognitive complexity
…ent <native> tag for rocoto when submitting to the HPSS queue (just like how get_obs tasks already do)
Co-authored-by: Michael Kavulich <kavulich@ucar.edu>
…n be imported and functions that don't require the extra dependencies can be used
…s so it can be used by the run_diff regression test script
…ss. List of tests to process is used to build list of diff tests to perform so it will report if any of those tests are missing from either output directory. Rename --baseline argument to --baseline_dir to distinguish it from --baseline argument to run_regression.py script which does not do the same thing
…written there instead of tests/WE2E directory
@georgemccabe
georgemccabe requested a review from mkavulich July 21, 2026 20:20
@georgemccabe
georgemccabe marked this pull request as ready for review July 21, 2026 20:20
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.

2 participants