Skip to content

Add suffix normalization#322

Merged
bamader merged 3 commits into
mainfrom
suffix-normalization
Apr 23, 2025
Merged

Add suffix normalization#322
bamader merged 3 commits into
mainfrom
suffix-normalization

Conversation

@bamader

@bamader bamader commented Apr 21, 2025

Copy link
Copy Markdown
Collaborator

Description

This changeset adds a pydantic validator that parses and normalizes suffixes according to a predefined mapping. I've left the mapping in an assets file in case we want to add roman numeral standardization at some later date.

Related Issues

Fixes #297

Additional Notes

I did some research on common suffixes in names in the US, and most results indicated it's pretty limited, just Junior, Senior, II, and III. It's easy to support roman numerals, as well as any other spelling or punctuated variants thereof, but given this I think leaving the suffixes we intend to support in an assets file (like with state abbreviations and street conventions) follows our established practice.

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@codecov

codecov Bot commented Apr 21, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (f54a090) to head (5176aa8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
+ Coverage   98.15%   98.16%   +0.01%     
==========================================
  Files          32       32              
  Lines        1838     1853      +15     
==========================================
+ Hits         1804     1819      +15     
  Misses         34       34              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/recordlinker/schemas/pii.py Outdated
ericbuckley
ericbuckley previously approved these changes Apr 22, 2025

@ericbuckley ericbuckley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🚀

@bamader bamader merged commit 2cacd8d into main Apr 23, 2025
@bamader bamader deleted the suffix-normalization branch April 23, 2025 15:02
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.

Add suffix normalization

2 participants