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

Bugfix: Fix PCPCombine extra options removal of semi-colon #1534

Closed
23 tasks
georgemccabe opened this issue Mar 23, 2022 · 0 comments · Fixed by #1535 or #1572
Closed
23 tasks

Bugfix: Fix PCPCombine extra options removal of semi-colon #1534

georgemccabe opened this issue Mar 23, 2022 · 0 comments · Fixed by #1535 or #1572
Assignees
Labels
METplus: Configuration type: bug Fix something that is not working

Comments

@georgemccabe
Copy link
Collaborator

Logic was added for #1212 to properly handle lists in METplus config files that were formatted like lists in MET config files, i.e.

["value1", "value2"];

However, the logic incorrectly removes trailing semi-colons when they are not closing a MET format list. This was discovered in PCPCombine wrapper when setting:

FCST_PCP_COMBINE_INPUT_OPTIONS = file_type = NETCDF_NCCF;

When setting extra options for field info, the semi-colon after a single option should be optional and should be added automatically, so the following should also work:

FCST_PCP_COMBINE_INPUT_OPTIONS = file_type = NETCDF_NCCF

Describe the Problem

See above

Expected Behavior

Adding each of the variable examples above to parm/use_cases/met_tool_wrapper/PCPCombine/PCPCombine_add.conf should not cause a failure.

Environment

Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop)
2. OS: (e.g. RedHat Linux, MacOS)
3. Software version number(s)

To Reproduce

Describe the steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

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

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next bugfix version

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Add any new Python packages to the METplus Components Python Requirements table.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.
@georgemccabe georgemccabe added type: bug Fix something that is not working alert: NEED MORE DEFINITION Not yet actionable, additional definition required alert: NEED ACCOUNT KEY Need to assign an account key to this issue alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle labels Mar 23, 2022
@georgemccabe georgemccabe added this to the METplus-5.0.0 milestone Mar 23, 2022
@georgemccabe georgemccabe self-assigned this Mar 23, 2022
georgemccabe added a commit that referenced this issue Mar 23, 2022
…r extra field options if not found (currently fails)
georgemccabe added a commit that referenced this issue Mar 23, 2022
…from list if it is not following square brackets []s (currently fails)
georgemccabe added a commit that referenced this issue Mar 23, 2022
…list if it is not following square brackets []s
georgemccabe added a commit that referenced this issue Mar 23, 2022
georgemccabe added a commit that referenced this issue Mar 23, 2022
…at the beginning of the input string) are handled properly
georgemccabe added a commit that referenced this issue Mar 23, 2022
georgemccabe added a commit that referenced this issue Apr 18, 2022
…r extra field options if not found (currently fails)
georgemccabe added a commit that referenced this issue Apr 18, 2022
…from list if it is not following square brackets []s (currently fails)
georgemccabe added a commit that referenced this issue Apr 18, 2022
…at the beginning of the input string) are handled properly
georgemccabe added a commit that referenced this issue Apr 18, 2022
…list if it is not following square brackets []s
georgemccabe added a commit that referenced this issue Apr 18, 2022
georgemccabe added a commit that referenced this issue Apr 18, 2022
@georgemccabe georgemccabe moved this from To do to Pull request review in Coordinated METplus-4.1 Support Apr 18, 2022
georgemccabe added a commit that referenced this issue Apr 20, 2022
* per #1534, add unit test for properly adding a trailing semi-colon for extra field options if not found (currently fails)

* per #1534, add unit test for properly preserving trailing semi-colon from list if it is not following square brackets []s (currently fails)

* added test for specifying multiple extra field options, ci-run-all-diff

* per #1534, added a test to ensure lists with line breaks (especially at the beginning of the input string) are handled properly

* per #1534, fix logic to properly preserving trailing semi-colon from list if it is not following square brackets []s

* per #1534, add additional strip commands to ensure that all whitespace is removed properly, ci-run-all-diff

* per #1534, fix logic to properly adding a trailing semi-colon for extra field options if not found
Repository owner moved this from Pull request review to Done in Coordinated METplus-4.1 Support Apr 20, 2022
Repository owner moved this from Review to Done in METplus-Wrappers-5.0.0-beta1 (6/22/22) Apr 20, 2022
@georgemccabe georgemccabe changed the title Fix PCPCombine extra options removal of semi-colon Bugfix: Fix PCPCombine extra options removal of semi-colon Apr 20, 2022
@georgemccabe georgemccabe added component: code cleanup Code cleanup and maintenance issue METplus: Configuration and removed alert: NEED MORE DEFINITION Not yet actionable, additional definition required alert: NEED ACCOUNT KEY Need to assign an account key to this issue alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle component: code cleanup Code cleanup and maintenance issue labels Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment