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

Fix curate --help #1755

Merged
merged 4 commits into from
Feb 12, 2025
Merged

Fix curate --help #1755

merged 4 commits into from
Feb 12, 2025

Conversation

joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Feb 12, 2025

Description of proposed changes

Limit the format-dates help to the first line, which does not include the %Y bit that was causing the error.

Related issue(s)

Resolves #1753

Checklist

  • Automated checks pass
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

Limit the `format-dates` help to the first line, which does not
include the `%Y` bit that was causing the error.

Resolves <#1753>
@victorlin
Copy link
Member

+1 for using first_line here, not because it avoids %Y (not a good enough reason IMO), but because it keeps the output of augur curate -h tidy.

A broader suggestion would be to tidy the rest of that help text. There are some existing usages of first_line where it is cut off mid-sentence, e.g.

    abbreviate-authors  Abbreviates a full list of authors to be '<first author> et al.' of the NDJSON
    parse-genbank-location
                        Parses GenBank's 'location' field of the NDJSON record to 3 separate
    transform-strain-name
                        Verifies strain name pattern in the 'strain' field of the NDJSON

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.12%. Comparing base (e6df775) to head (1d6724e).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
augur/curate/titlecase.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1755   +/-   ##
=======================================
  Coverage   73.11%   73.12%           
=======================================
  Files          79       79           
  Lines        8350     8353    +3     
  Branches     1704     1704           
=======================================
+ Hits         6105     6108    +3     
  Misses       1958     1958           
  Partials      287      287           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Clean up the first line of subcommand docstrings and use `first_line`
for the help message of all curate subcommands to tidy up the help text.

Suggested by @victorlin in review
<#1755 (comment)>
@joverlee521 joverlee521 merged commit 6ea375a into master Feb 12, 2025
36 checks passed
@joverlee521 joverlee521 deleted the fix-curate-help branch February 12, 2025 20:19
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.

augur curate --help raises ValueError
2 participants