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

Curate titlecase #1197

Merged
merged 5 commits into from
Jul 28, 2023
Merged

Curate titlecase #1197

merged 5 commits into from
Jul 28, 2023

Commits on Jul 28, 2023

  1. [titlecase] Adds augur curate titlecase sub-command

    Adds a new sub-command `augur curate titlecase` based on the transform-string-fields
    script in the monkeypox repo. The `augur curate normalize` sub-command
    has already been added based on the same script (#1039).
    
    Overall this is part of filling in the gaps in the augur curate suite of commands (#860),
    specifically addressing issue (#999), and is a follow-up to #1039.
    
    `augur curate titlecase` would transform the values of a given metadata field to titlecase.
    This is useful for normalizing the values of a string that may contain inconsistent
    capitalization such as "North America" and "north america".
    
    This commit also adds a test for the new sub-command and updates the documentation.
    For testing an upper case to lower case circumflex'd o character conversion, had to use
    the escaped unicode character
    
    Co-authored-by: Jover Lee <joverlee521@gmail.com>
    j23414 and joverlee521 committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    9100ffe View commit details
    Browse the repository at this point in the history
  2. [titlecase] Tests more edge cases

    Tests a few more valid (and invalid) edge cases for augur curate titlecase.
    
    1. Skip processing fields that have a null value
    2. Throw an error on fields that have a bare-int (or non-string) value
    3. Skip processing fields that do not exist in the data
    j23414 committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    c33ea6c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9b191fc View commit details
    Browse the repository at this point in the history
  4. [titlecase] Add compatibility with error_all

    Co-authored-by: Jover Lee <joverlee521@gmail.com>
    j23414 and joverlee521 committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    91e8a12 View commit details
    Browse the repository at this point in the history
  5. Update changelog

    j23414 committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    e091e9c View commit details
    Browse the repository at this point in the history