Skip to content

Commit e189822

Browse files
derek73claude
andauthored
Trim the 2.4.0 release notes to index bullets and link issues (#646)
* docs(release): cut the 2.4.0 notes to index bullets and link issues Each 2.4.0 bullet is now a bold lead, one before/after example and :issue: links; the mechanism, boundary cases and measurements stay in the issues and docs/design/decisions.md. Bullets a user sees as one change are merged. 10,765 words and 45 bullets become 1,491 and 32. Add sphinx.ext.extlinks with an :issue: role and convert the older entries' #N references (223 of them; the 21 inside bold leads stay plain, since RST markup does not nest). Fix a `()#147)` typo and a bold lead that rendered raw backticks. AGENTS.md's release-log instructions describe the new bullet shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(release): add the 2.4.0 summary and use realistic examples The 2.4.0 entry opens with a summary and six highlights. Examples that showed a cost (PhD Jones) or used placeholders (X.Y.Z., x.y.z.) are replaced by real credentials (LEED AP, N.C.C., r.d.n.) and names (Jane Smith, PhD MA; Eric H. Holder Jr. Attorney General); MA vs Ma is shown on one name. Every example was checked against the 2.3.0 wheel and the tree. The performance bullet's "make parsing faster" lead is dropped: measured on py3.11, ordinary names parse in the same time as 2.3.0 (about 68 us/name for parse() over 866 corpus names); the 25% fewer calls per parse do not show on the clock. Sentences ending in an example that ends in a period no longer render a double period. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(release): link 2.4.0 bullets to the user-docs sections Fourteen 2.4.0 bullets now end with "See <section>." pointing at the usage or customize section that documents the behavior or its knob (CapsSuffixes.OFF lives under customize's "All-caps words"). Six headings gain labels for this: trailing-titles, parser-guesses and credentials-also-surnames in usage.rst; connectives-also-initials, dotted-credentials and all-caps-credentials in customize.rst. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(customize): show a user's own mask outranking a particle's lowercase The 2.4.0 release note says a caller's capitalization_exceptions entry now outranks the lowercase case repair gives a particle, but the docs witnessed the rule only with the shipped Irish masks. Add a doctest with a ("van", "Van") entry: Martin Van Buren keeps his capital, and Ludwig Van Beethoven shows the cost, since a mask applies wherever its word stands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(release): link the Irish-particle bullet to the case-exceptions section Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6dae824 commit e189822

5 files changed

Lines changed: 287 additions & 263 deletions

File tree

‎AGENTS.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,17 @@ uv run sphinx-build -b html docs dist/docs
7373
# Maintain docs/release_log.rst as changes land:
7474
# - Keep an "Unreleased" entry at the top: `* X.Y.Z - Unreleased`
7575
# - Add one bullet per notable change; prefix with Add/Fix/Remove/Change
76-
# - Reference the issue or PR in parentheses: (#123) or (#123, #124)
77-
# Use "closes #N" when the change directly resolves the issue
76+
# - A bullet is an index, not the record: a bold lead (plain text only --
77+
# RST markup does not nest, so no ``literal`` or role inside ** **), ONE
78+
# before/after example naming the releases it differs from, a limit
79+
# sentence only where a caller would trip on it, then the issue link(s):
80+
# :issue:`123` or :issue:`123`, :issue:`124` (sphinx.ext.extlinks; a PR
81+
# number works too). The mechanism, boundary cases and measurements live
82+
# in the issue and docs/design/decisions.md, never in the bullet --
83+
# 2.4.0's entry was cut from 10,765 words to 1,491 on 2026-10-11
84+
# - Merge bullets a user would see as one change, with several links
7885
# - Version is decided at release time (patch/minor/major per semver)
79-
# - Format matches existing entries — see 1.3.0 block for a current example
86+
# - Format matches existing entries — see the 2.4.0 block for a current example
8087

8188
# Release checklist (PyPI publish is triggered automatically by GitHub Actions on release creation)
8289
# 0. Sweep for stale prose. Grepping for the changed SYMBOL finds almost none of

‎docs/conf.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,15 @@
3434
'sphinx.ext.autodoc',
3535
'sphinx.ext.doctest',
3636
'sphinx.ext.viewcode',
37+
'sphinx.ext.extlinks',
3738
]
3839

40+
# :issue:`575` renders as a "#575" link. GitHub redirects /issues/N to
41+
# /pull/N when N is a PR, so the one role serves both.
42+
extlinks = {
43+
'issue': ('https://github.com/derek73/python-nameparser/issues/%s', '#%s'),
44+
}
45+
3946
# Declaration order is canonical in this codebase (Role order drives the
4047
# seven-field order everywhere), so the reference lists members in
4148
# source order, not alphabetically -- Lexicon's vocabulary grouping and

‎docs/customize.rst‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,23 @@ particles, which are written capitalized:
208208
>>> str(parse("JUAN DE LA VEGA").capitalized())
209209
'Juan de la Vega'
210210

211+
Your own entry outranks it the same way, which is how to keep a
212+
family's capitalized particle. A mask applies wherever its word stands,
213+
though, so it recases every other name with that particle too:
214+
215+
.. doctest::
216+
217+
>>> str(parse("martin van buren").capitalized())
218+
'Martin van Buren'
219+
>>> van_lex = dataclasses.replace(
220+
... default,
221+
... capitalization_exceptions=tuple(default.capitalization_exceptions)
222+
... + (("van", "Van"),))
223+
>>> str(parse("martin van buren").capitalized(van_lex))
224+
'Martin Van Buren'
225+
>>> str(parse("ludwig van beethoven").capitalized(van_lex))
226+
'Ludwig Van Beethoven'
227+
211228
How a key matches a word
212229
^^^^^^^^^^^^^^^^^^^^^^^^
213230

@@ -399,6 +416,8 @@ For ``particles_ambiguous`` the default runs the other way from
399416
credentials: a particle that is not borne as a given name belongs
400417
outside the set, which is where ``mc`` and ``ste`` were moved (#360).
401418

419+
.. _connectives-also-initials:
420+
402421
One-letter connectives that are also initials
403422
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
404423

@@ -1078,6 +1097,8 @@ opposite:
10781097
>>> cred.title, cred.given
10791098
('Ms', 'G.J.')
10801099

1100+
.. _dotted-credentials:
1101+
10811102
Dotted acronyms
10821103
^^^^^^^^^^^^^^^
10831104

@@ -1135,6 +1156,8 @@ way:
11351156
>>> dotted_off.parse("Jane Doe nee Smith X.Y.Z.").maiden
11361157
'Smith X.Y.Z.'
11371158

1159+
.. _all-caps-credentials:
1160+
11381161
All-caps words
11391162
^^^^^^^^^^^^^^
11401163

0 commit comments

Comments
 (0)