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

Add help text to clarify extend actions #1705

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Jan 3, 2025

Description of proposed changes

Done programmatically by replacing ArgumentDefaultsHelpFormatter with a new CustomHelpFormatter.

Related issue(s)

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

  • Tested locally with output of augur curate format-dates -h:

      --metadata-delimiters METADATA_DELIMITERS [METADATA_DELIMITERS ...]
                            Delimiters to accept when reading a plain text metadata file. Only
                            one delimiter will be inferred. Specified values will override the
                            default list. (default: (',', '\t'))
    
      --date-fields DATE_FIELDS [DATE_FIELDS ...]
                            List of date field names in the record that need to be standardized.
                            (default: None)
    
      --expected-date-formats EXPECTED_DATE_FORMATS [EXPECTED_DATE_FORMATS ...]
                            Expected date formats that are currently in the provided date fields,
                            defined by standard format codes as listed at
                            https://docs.python.org/3/library/datetime.html#strftime-and-
                            strptime-format-codes. If a date string matches multiple formats, it
                            will be parsed as the first matched format in the provided order.
                            Specified values will extend the default list. (default: ['%Y-%m-%d',
                            '%Y-%m-XX', '%Y-XX-XX', 'XXXX-XX-XX'])
    

@victorlin victorlin self-assigned this Jan 3, 2025
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 72.72%. Comparing base (a57d50c) to head (3d71c25).

Files with missing lines Patch % Lines
augur/argparse_.py 25.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1705      +/-   ##
==========================================
- Coverage   72.82%   72.72%   -0.10%     
==========================================
  Files          79       79              
  Lines        8272     8286      +14     
  Branches     1691     1697       +6     
==========================================
+ Hits         6024     6026       +2     
- Misses       1960     1972      +12     
  Partials      288      288              

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

Start with a copy of ArgumentDefaultsHelpFormatter. To be modified.
This is only meaningful for options that have default values specified.
Copy link
Contributor

@genehack genehack left a comment

Choose a reason for hiding this comment

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

didn't test, code looks okay

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.

Improve help text of CLI options that use extend and ExtendOverwriteDefault actions
2 participants