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

Clarify command line help for report --run_results & --run_matrices #356

Merged
merged 3 commits into from
Nov 19, 2021

Conversation

peterjc
Copy link
Collaborator

@peterjc peterjc commented Nov 18, 2021

This PR tries to improve the command line help text for pyani report options --run_results & --run_matrices. Before:

$ pyani report --help
...
  --run_results RUN_RESULTS
                        Report table of results for a pyani run (default:
                        False)
  --run_matrices RUN_MATRICES
                        Report matrices of results for a pyani run (default:
                        False)
...

After:

$ pyani report --help
...
  --run_results RUN_ID  Report table of results for comma separated list of
                        runs (default: False)
  --run_matrices RUN_ID
                        Report matrices of results for comma separated list of
                        runs (default: False)
...

This documents that these arguments can be comma separated lists.

The choice of metavariable name is to match pyani plot:

$ pyani plot --help
...
  --run_id RUN_ID       run ID to plot (default: None)
...

Perhaps the defaults could be consistent - None in both cases?

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)
  • This change requires a documentation update
  • This is a documentation update

Action Checklist

  • Work on a single issue/concept (if there are multiple separate issues to address, please use a separate pull request for each)
  • Fork the pyani repository under your own account (please allow write access for repository maintainers)
  • Set up an appropriate development environment (please see CONTRIBUTING.md)
  • Create a new branch with a short, descriptive name
  • Work on this branch
    • style guidelines have been followed
    • new code is commented, especially in hard-to-understand areas
    • corresponding changes to documentation have been made
    • tests for the change have been added that demonstrate the fix or feature works
  • Test locally with pytest -v non-passing code will not be merged
  • Rebase against origin/master
  • Check changes with flake8 and black before submission
  • Commit branch
  • Submit pull request, describing the content and intent of the pull request
  • Request a code review
  • Continue the discussion at Pull requests section in the pyani repository

Now matches pyani plot --run_id behaviour.

Also document that these can be comma separated lists.

And fix some redundant string addition.
@peterjc peterjc requested a review from widdowquinn as a code owner November 18, 2021 13:02
@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #356 (1da8b66) into master (6a3e18b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #356   +/-   ##
=======================================
  Coverage   76.24%   76.24%           
=======================================
  Files          52       52           
  Lines        3385     3385           
=======================================
  Hits         2581     2581           
  Misses        804      804           

@baileythegreen
Copy link
Contributor

This is good, and potentially means #332 can be closed, too.

I would suggest changing the metavar to RUN_IDS, which still ties in with pyani plot, but sounds more like it can accept multiple values.

Copy link
Contributor

@baileythegreen baileythegreen left a comment

Choose a reason for hiding this comment

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

I think a plural metavar might be clearer.

@peterjc
Copy link
Collaborator Author

peterjc commented Nov 18, 2021

I did consider RUN_IDS but that extra character meant an extra line for the command line help. But as you wish?

Suggestion from code review

Co-authored-by: Bailey Harrington <[email protected]>
@peterjc
Copy link
Collaborator Author

peterjc commented Nov 18, 2021

I think changing the default for these two arguments from False to None would help for #332 - shall I do that too?

@baileythegreen
Copy link
Contributor

I think changing the default for these two arguments from False to None would help for #332 - shall I do that too?

Yes, I think that will clear up a lot of the confusion this causes (me, anyway).

Also matches the plot command option taking a run ID.

Addresses widdowquinn#332 in part.
@baileythegreen
Copy link
Contributor

baileythegreen commented Nov 19, 2021

This looks good! I'm closing this, and #332. The documentation for pyani report will need to be updated, but since that is still in a pending PR of mine, I will handle that.

@baileythegreen baileythegreen merged commit 2bd034e into widdowquinn:master Nov 19, 2021
@peterjc peterjc deleted the report_run_id branch November 19, 2021 14:22
@peterjc
Copy link
Collaborator Author

peterjc commented Nov 19, 2021

PS Typo, not issue 3-2-2 but 3-3-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants