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

Command line arguments to override single variables do not support lists #511

Closed
19 tasks
georgemccabe opened this issue Jun 17, 2020 · 0 comments · Fixed by #2815
Closed
19 tasks

Command line arguments to override single variables do not support lists #511

georgemccabe opened this issue Jun 17, 2020 · 0 comments · Fixed by #2815
Assignees
Labels
METplus: Configuration priority: medium Medium Priority reporting: NRL METplus Naval Research Laboratory METplus Project requestor: METplus Team METplus Development Team type: enhancement Improve something that it is currently doing
Milestone

Comments

@georgemccabe
Copy link
Collaborator

georgemccabe commented Jun 17, 2020

You can specify variables on the command line when calling master_metplus.py like this:

master_metplus.py -c config.PROCESS_LIST=EnsembleStat

However, you cannot pass in a list of items, even if the list is surrounded by quotes:

master_metplus.py -c config.PROCESS_LIST="EnsembleStat,GridStat"

This is likely due to the logic to parse the command line arguments splitting items by comma without considering if it is within quotes. There is a function in the utility code that handles this situation already.

Issue #510 is related and could be done at the same time while this logic is being touched.

Describe the Enhancement

See description above.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the enhancement down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

MUST be completed by 12/30/2024

Funding Source

7730022

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Review projects and select relevant Repository and Organization ones
  • Select milestone

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

  • Complete the issue definition above.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@georgemccabe georgemccabe added the type: enhancement Improve something that it is currently doing label Jun 17, 2020
@georgemccabe georgemccabe added this to the METplus-4.0 milestone Jul 15, 2020
@georgemccabe georgemccabe added the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Sep 10, 2020
@georgemccabe georgemccabe self-assigned this Dec 7, 2021
@georgemccabe georgemccabe removed this from the METplus-5.0.0 milestone Mar 22, 2022
@georgemccabe georgemccabe added priority: medium Medium Priority and removed priority: low Low Priority labels Jun 26, 2024
@DanielAdriaansen DanielAdriaansen added reporting: NRL METplus Naval Research Laboratory METplus Project and removed alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle labels Nov 15, 2024
@DanielAdriaansen DanielAdriaansen moved this from 🟢 Ready to 🎯 Up Next in METplus-Wrappers-6.1.0 Development Nov 15, 2024
@georgemccabe georgemccabe moved this from 🎯 Up Next to 🏗 In progress in METplus-Wrappers-6.1.0 Development Dec 4, 2024
georgemccabe added a commit that referenced this issue Dec 6, 2024
…ted lists in a command line single config override that should fail until fix is made
georgemccabe added a commit that referenced this issue Dec 6, 2024
…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
@georgemccabe georgemccabe linked a pull request Dec 6, 2024 that will close this issue
16 tasks
@georgemccabe georgemccabe moved this from 🏗 In progress to 🔎 In review in METplus-Wrappers-6.1.0 Development Dec 6, 2024
georgemccabe added a commit that referenced this issue Dec 12, 2024
* exclude metplus/scripts dir from PyCharm project to prevent incorrect duplicate code warnings with files that are sym linked

* to expand on #2772, updating instructions to include note to set tmp directory for apptainer to prevent issues pulling large images that require a lot of temp space

* per #511, add unit test for expected behavior to support comma-separated lists in a command line single config override that should fail until fix is made

* add a test to ensure that the -c argument is properly ignored since it is can be used in old use cases that were created when the argument was required

* per #511, add support for command line single config overrides to include 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

* added unit test to ensure that an invalid command line argument causes the appropriate failure from run_metplus.py
@github-project-automation github-project-automation bot moved this from 🔎 In review to 🏁 Done in METplus-Wrappers-6.1.0 Development Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
METplus: Configuration priority: medium Medium Priority reporting: NRL METplus Naval Research Laboratory METplus Project requestor: METplus Team METplus Development Team type: enhancement Improve something that it is currently doing
Projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

2 participants