Feature #3218 warn overwrite, #2110 fail if output exists - #3332
Draft
georgemccabe wants to merge 46 commits into
Draft
Feature #3218 warn overwrite, #2110 fail if output exists#3332georgemccabe wants to merge 46 commits into
georgemccabe wants to merge 46 commits into
Conversation
…ing overwritten, indicating that a misconfiguration is present. Pass list of outputs to the next wrapper in the process list so it can properly check if multiple instances are writing to the same path. Move logic to run processes into a function that can be called by unit tests to test behavior from running multiple processes, e.g. multiple instances of the same wrapper.
…t a duplicate file path is being overwritten
…re being overwritten
…sting various scenarios such as: 2 fields processed separately, runtime freq doesn't match output template, custom loop list, and multiple instances. This includes updated test logic to properly test multiple PROCESS_LIST items instead of creating/calling a single wrapper/process as many test do. Consider adding a fixture to easily handle the config and process list initialization that can be resused in many tests
…m templates for each of the RUNTIME_FREQ settings
…sues by changing the output template and/or prefix
…ric variables are not set
…multiple wrappers at once and 2) skip steps specific to MET config variables
…dd to warning message with info on how to disable it
…nings when output is written more than once in a single METplus run
… encountered. This setting coupled with the new logic to warn if output has already been generated within a given METplus run will cause a run to fail in this case. Note that this does not warn/fail if the output already exists on disk from a previous run
…ee which use cases currently output a warning log
…g pytests from top-level directory
…lid behavior to read skip lead seq setting and skip if set
…write is expected
… RegridDataPlane wrapper
…uld resolve the redundant run
…me valid is processed more than once based on the configuration and it doesn't need to be run multiple times
…s when a warning occurs and EXIT_ON_WARN=True
…cause the exception will prevent the info log from being output
… output a warning when the output file attempted to be written already exists on disk. Coupled with EXIT_ON_WARN, this accomplishes the desired behavior in issue #2110
…init and running processes. Note currently EXIT_ON_WARN is only supported on the global level and is read upon initial METplusConfig initialization, so the test had to be written to set this config setting before initializating the config.
… a warning log is still output if SKIP_IF_OUTPUT_EXISTS is not set
This was
linked to
issues
Jul 27, 2026
Coverage Report for CI Build 30297088544Coverage increased (+0.1%) to 92.184%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
WARN_IF_DUPLICATE_OUTPUT(when the same output is written within the same METplus run) and wrapper-specific config options -- wrt Create WARNING message for operations that overwrite output files #3218WARN_IF_OUTPUT_EXISTS(when output already exists on disk) and wrapper-specific config options -- wrt Add config option to fail if output already exists #2110EXIT_ON_WARNconfig option to end METplus run immediately when a warning log is encountered (note: issue Enhancement: Support wrapper-specific EXIT_ON_WARN config options #3333 was created for adding support for wrapper-specific options) -- wrt Add config option to fail if output already exists #2110EXIT_ON_WARNfor all use case tests, requiring that all warnings be resolved or ignored for use cases added to the repositoryadd_met_config_helper.pyscript to help add config support (documentation, basic use case conf updates, etc.) for all (or multiple) wrappers and for non-MET config variables (skips steps specific to MET tools)Pull Request Testing
Added unit tests to demonstrate expected behavior
John HG - review code changes under
metplusdirectory and unit tests underinternal/tests/pyteststo confirm correctness. Review use case diffs (see below)? - review documentation changes - Are the new configs named well? Should there be a new section in the User's Guide (under Configuration chapter?) to describe warning, config variables to skip certain warnings, and exiting when a warning is encountered?
Unless review suggests adding more
Do these changes include sufficient testing updates? [Yes]
Will this PR result in changes to the test suite? [Yes]
If yes, describe the new output and/or changes to the existing output:
met_tool_wrapper:30-58,68-69
medium_range:3-5,10
s2s_mid_lat
FAILED DUE TO WARNING FOR EXPECTED MISSING FILE (in create_cbl_filelist but maybe more?) -- need to think of a solution...
Do these changes introduce new SonarQube findings? [No]
If yes, please describe:
Please complete this pull request review by 2026/8/18.
Pull Request Checklist
See the METplus Workflow for details.
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 METplus-Wrappers-X.Y.Z Development project for official releases