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 #482 support any variation of 1, true in show_legend settings… #487

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

bikegeek
Copy link
Collaborator

@bikegeek bikegeek commented Jan 24, 2025

… (in the YAML config file)

Pull Request Testing

  • Describe testing already performed for these changes:

    generated line plots using the following YAML config file and sample data:

    modified the show_legend setting to:

    • 1
    • '1'
    • 'true'
    • 'TRue'
    • truE

and verified the generated plots have the legend label
- values other than 1, '1', true (any case combination):
- false
- False
- 0

and verified the generated plots do NOT have the legend labels displayed, as requested.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

on 'seneca':

  • METcalcpy (develop) and METplotpy (feature_482_legend_labels) are located at:
    /d1/projects/PR_METplotpy_482

  • run in bash shell

  • activate this conda environment:

    /d1/personal/mwin/miniconda3/envs/mp_analysis_env

  • Test using the debug.yaml and debug.data file located in the /d1/projects/PR_METplotpy_482/METplotpy/metplotpy/plots/line directory
    - **modify the following setting ** to verify that the legend labels show or are hidden, based on setting 'True' (any variation of capitalization/lower case), 1, '1' to show and anything else.

    !!! line 171 !!!

    show_legend:
         - 'FALSE'
    
  • Generate the plot by running:

    python line.py debug.yaml
    
  • A plot named plot_legends.png will be generated:

SHOW LEGEND TURNED OFF:
no_legend_example

SHOW LEGEND TURNED ON:

show_legend_example
  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [NA]

  • Do these changes include sufficient testing updates? [NA]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

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

    If yes, please describe: possible QualityGate findings since this code may be considered "new"

  • Please complete this pull request review by before Beta2 release.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • 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 METplotpy-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.

@bikegeek bikegeek requested a review from jprestop January 24, 2025 22:37
@bikegeek bikegeek marked this pull request as draft January 24, 2025 22:37
@bikegeek bikegeek added this to the METplotpy-3.1.0 milestone Jan 29, 2025
@bikegeek bikegeek linked an issue Jan 29, 2025 that may be closed by this pull request
24 tasks
@bikegeek bikegeek marked this pull request as ready for review January 29, 2025 20:25
Copy link
Contributor

@jprestop jprestop left a comment

Choose a reason for hiding this comment

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

I ran the commands you suggested and saw the expected results with show_legend set to True and False. I approve this PR. Thanks for all of your work on this @bikegeek.

@bikegeek bikegeek merged commit fa9a2d4 into develop Jan 30, 2025
7 checks passed
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.

Support various formats of show_legend values
2 participants