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

Use identical help text for shared options #1597

Open
victorlin opened this issue Aug 21, 2024 · 0 comments
Open

Use identical help text for shared options #1597

victorlin opened this issue Aug 21, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@victorlin
Copy link
Member

victorlin commented Aug 21, 2024

from #1591 (comment)

Scope

  • --metadata-id-columns
  • --metadata-delimiters
  • ?

Context

Help text for these arguments differ across subcommands. This is the --metadata-id-columns help text for augur merge:

  --metadata-id-columns COLUMN [COLUMN ...]
                        Possible metadata column names containing identifiers, considered in the order given. Columns will be considered for all metadata tables. Only one ID column will be inferred for each
                        table. (default: strain name)

for augur filter:

  --metadata-id-columns METADATA_ID_COLUMNS [METADATA_ID_COLUMNS ...]
                        names of possible metadata columns containing identifier information, ordered by priority. Only one ID column will be inferred. (default: ('strain', 'name'))

The augur filter version is used ~everywhere else. The augur merge version is an improvement of this from 0552f5f.

It has also propagated outside this repo to set_final_strain_name.py but I wouldn't worry about that as it's slated for removal.

Possible solutions

  1. Store help text in a shared variable.

  2. Use a shared parser config to add these options. Example:

    def add_input_metadata_options(parser):
        parser.add_argument("--metadata-id-columns", ...)
        parser.add_argument("--metadata-delimiters", ...)
        ...

    This might be more complicated to get right across all but helps reduce redundancy of not just the help text but also other parameters to add_argument including the option name.

For any solution, there should be a way to add an additional subcommand-specific snippet such as "Columns will be considered for all metadata tables" which is only applicable to augur merge.

@victorlin victorlin added the documentation Improvements or additions to documentation label Aug 21, 2024
@victorlin victorlin mentioned this issue Aug 21, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant