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

Improve help text of CLI options #1630

Open
2 tasks
Tracked by #1642
victorlin opened this issue Sep 13, 2024 · 3 comments
Open
2 tasks
Tracked by #1642

Improve help text of CLI options #1630

victorlin opened this issue Sep 13, 2024 · 3 comments

Comments

@victorlin
Copy link
Member

victorlin commented Sep 13, 2024

Example: augur filter --group-by-weights

Rendered rST docs is formatted nicely:

image

CLI help text is not great:

  --group-by-weights FILE
                        TSV file defining weights for grouping. Requirements: (1) Lines starting
                        with '#' are treated as comment lines. (2) The first non-comment line must
                        be a header row. (3) There must be a numeric ``weight`` column (weights can
                        take on any non-negative values). (4) Other columns must be a subset of
                        columns used in ``--group-by``, with combinations of values covering all
                        combinations present in the metadata. (5) This option only applies when
                        ``--group-by`` and ``--subsample-max-sequences`` are provided. (6) This
                        option cannot be used with ``--no-probabilistic-sampling``. Notes: (1) Any
                        ``--group-by`` columns absent from this file will be given equal weighting
                        across all values *within* groups defined by the other weighted columns. (2)
                        An entry with the value ``default`` under all columns will be treated as the
                        default weight for specific groups present in the metadata but missing from
                        the weights file. If there is no default weight and the metadata contains
                        rows that are not covered by the given weights, augur filter will exit with
                        an error. (default: None)

Possible solutions

  1. Ensure all help text is correctly formatted (e.g. wrapped if necessary) in the source code

  2. Use help_formatter=argparse.RawTextHelpFormatter (doc)

  3. Render the rST to plain text

Related PRs

@jameshadfield
Copy link
Member

Is this the same as #313?

@victorlin
Copy link
Member Author

Oh yes, thanks! Closing this as duplicate.

@victorlin victorlin closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2024
@victorlin victorlin added the duplicate This issue or pull request already exists label Sep 23, 2024
@victorlin victorlin changed the title Improve CLI help text Improve help text of CLI options Sep 24, 2024
@victorlin
Copy link
Member Author

I've clarified the scope of #313 so this is no longer a duplicate.

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

No branches or pull requests

2 participants