Skip to content

Replace the group suggester's example name with Smith Mary - #1354

Merged
derek73 merged 1 commit into
masterfrom
docs/replace-example-name
Nov 12, 2026
Merged

derek73 merged 1 commit into
masterfrom
docs/replace-example-name

Conversation

@derek73

@derek73 derek73 commented Nov 12, 2026

Copy link
Copy Markdown
Owner

A rename with no behavior change. The group suggester's example name may be a real person's name, so it is replaced with Smith Mary / Mary Smith (Smith, Mary in comma form) in docs/suggest.rst, the Parser.suggest() release bullet, the bare-string error message in nameparser/_suggest.py, and tests/v2/test_suggest.py, test_reprs.py and test_types.py. The docs-rewrite PR #1353 doesn't touch these files, and none of its files holds the name.

Why this pair: mary is in COMMON_GIVEN_NAMES and smith is in neither COMMON_GIVEN_NAMES nor ROMANIZED_SURNAMES. That matches the names they replace, where the given name votes and the surname does not, so every name votes as the one it replaces.

Collision renames: four groups already held a Mary Smith, which the swap would have duplicated. There, the existing Mary Smith became Ruth Hollis (ruth is a listed given name, hollis is in no table). In one of those groups, the other name that held the old surname became Mary Hollis. In test_reprs.py, the words checked for absence from the repr are now ("Mary", "Kim", "Smith"), so the list holds no duplicate. No expected value changed except the name text.

How "no behavior change" was shown:

  • A pytest plugin wrapped Parser.suggest and logged every call the three test modules make: the input names, the patch, each name's votes, each evidence's setting, decision, votes and note, and the disagreeing names. That came to 292 calls, run on master and on this branch.
  • After mapping the old names to the new ones, the two logs are identical.
  • Compared with the names ignored, 0 of 292 calls differ in votes, patch or evidence. Without the name mapping, 87 records differ, which shows the comparison can report a difference.
  • The three modules give 837 passed both before and after.
  • Re-ran the docs/suggest.rst doctest and the release bullet's example. suggest([...]).parser.parse("Smith Mary") gives given Mary, family Smith, and Parser().parse("Smith Mary") gives given Smith, family Mary, so the bullet's sentence still holds as written.

Checks: uv run pytest (45,962 passed), uv run pytest -n0 -m serial (35 passed), uv run mypy, uv run ruff check, sphinx-build -b doctest docs (0 failures), sphinx-build -W -b html docs, python -m doctest README.rst. git grep -i finds no trace of the old name anywhere in the tree.

🤖 Generated with Claude Code

The suggester's docs, release bullet, error message and tests used an
example name that may be a real person's; they now use Smith Mary /
Mary Smith. Mary is in the given-name table and Smith in no surname
table, so every name votes as the one it replaces. Where the swap
would have made two names in one group equal, the other name became
Ruth Hollis (and Mary Hollis). No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derek73 derek73 added this to the 3.1 milestone Nov 12, 2026
@derek73 derek73 added docs Documentation fixes and updates tests labels Nov 12, 2026
@derek73 derek73 self-assigned this Nov 12, 2026
@derek73
derek73 merged commit 2c7c993 into master Nov 12, 2026
14 checks passed
@derek73
derek73 deleted the docs/replace-example-name branch November 12, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation fixes and updates tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant