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 #511 lists in command line single config overrides #2815

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

georgemccabe
Copy link
Collaborator

@georgemccabe georgemccabe commented Dec 6, 2024

Pull Request Testing

  • Describe testing already performed for these changes:
  • Added unit tests to ensure desired behavior occurs before implementing changes, then confirmed that the new tests pass after the enhancement was implemented
  • Added a unit test to ensure that the deprecated -c argument is properly ignored if provided in a command
  • Added a unit test to ensure that an invalid command line argument results in the appropriate failure of the run_metplus.py run
  • Tested running METplus with list values as single config command line overrides (and other conditions) and confirmed that expected behavior occurred.
    Example tests:
  1. Comma-separated list with spaces and quotes
run_metplus.py \
  ~/METplus/parm/use_cases/met_tool_wrapper/GridStat/GridStat.conf \
  ~/mccabe.ral-dimeola.conf config.PROCESS_LIST="GridStat, Example"
echo $?

0

  1. Comma-separated list without spaces (quotes not needed)
run_metplus.py \
  ~/METplus/parm/use_cases/met_tool_wrapper/GridStat/GridStat.conf \
  ~/mccabe.ral-dimeola.conf \
  config.PROCESS_LIST=GridStat,Example
echo $?

0

  1. `-c argument properly ignored
run_metplus.py \
  -c \
  ~/METplus/parm/use_cases/met_tool_wrapper/GridStat/GridStat.conf \
  ~/mccabe.ral-dimeola.conf \
  config.PROCESS_LIST=GridStat,Example
echo $?

0

  1. Invalid argument causes failure
run_metplus.py \
  ~/METplus/parm/use_cases/met_tool_wrapper/GridStat/GridStat.conf \
  ~/mccabe.ral-dimeola.conf \
  config.PROCESS_LIST=GridStat,Example \
  --fake-arg
echo $?

1

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
  • Ensure all tests pass
  • Test use case runs with command line overrides that demonstrate proper handling of list values
  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No]

#2814 will add documentation to describe how to use command line arguments to override single config variables. An example(s) to show how to set a value with a list should be included.

  • 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:

New tests were added but they should all pass

  • Do these changes introduce new SonarQube findings? [No]

    If yes, please describe:

  • Please complete this pull request review by 12/9/2024.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • For any new datasets, an entry to the METplus Verification Datasets Guide.
  • 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 METplus-Wrappers-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.

… duplicate code warnings with files that are sym linked
…directory for apptainer to prevent issues pulling large images that require a lot of temp space
…ted lists in a command line single config override that should fail until fix is made
…t is can be used in old use cases that were created when the argument was required
…lude values that are lists. Simplify logic to parse arguments to strip out -c/--config/-config arguments and skip check/error if argument is invalid because it is already handled in the metplus_config setup step that parses the arguments
…s the appropriate failure from run_metplus.py
@georgemccabe georgemccabe added this to the METplus-6.1.0 milestone Dec 6, 2024
@georgemccabe georgemccabe linked an issue Dec 6, 2024 that may be closed by this pull request
19 tasks
Copy link
Contributor

@DanielAdriaansen DanielAdriaansen left a comment

Choose a reason for hiding this comment

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

I'm not sure what the changes to METplus.iml are or why they were needed here, but don't see an issue with that change.

The tests look straightforward and the description of testing the tests was helpful and seems appropriate to verify the desired functionality.

I also reviewed the documentation changes about using Apptainer here:
https://metplus--2815.org.readthedocs.build/en/2815/Users_Guide/getting_started.html#metplus-in-apptainer

and that looks good. Thanks for including those changes @georgemccabe.

I approve.

@georgemccabe georgemccabe merged commit dc75ada into develop Dec 12, 2024
77 checks passed
@georgemccabe georgemccabe deleted the feature_511_cl_lists branch December 17, 2024 20:23
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.

Command line arguments to override single variables do not support lists
2 participants