Repository navigation
Split the usage, customize and locales docs into nine pages by task (move only) - #1343
Merged
Merged
Conversation
… verbatim A move-only commit: every section of docs/usage.rst, docs/customize.rst and docs/locales.rst lands on one of nine pages (usage, shapes, east-asian, suggest, matching, customize, policy, locales, languages) with its text unchanged, only its heading underline re-leveled where it became a page title or moved up a level. shapes and languages get a title and one lead sentence; index.rst groups the toctree by task. Imports, labels and link fixes follow in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…erences The second half of the move-only split, and its only new text: one visible import line at the head of each new page's first doctest (shapes, east-asian, matching, policy, languages), labels for Vocabulary: Lexicon and Romanized Indic titles, eleven title links that no longer resolve on their new page rewritten as :ref: with their link text unchanged, and a pointer in usage.rst holding the usage.html#east-asian-names anchor the released README links to. References to the moved sections are repointed: the 1,000 Spanish given names check in test_es_given_names.py reads languages.rst and policy.rst, comments in tests, tools and nameparser/locales/ja.py name the page a passage now lives on, eight release-log :doc: links whose section moved now target policy or east-asian, and the root and docs AGENTS.md name the new pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y's comment at policy.rst The sentence closing "What happens automatically" sent readers to the customize page for switches that moved to this page's "East Asian defaults, and turning them off"; the link's target changes, its sentence does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/resources.rst was eight external links, several stale, and nothing linked to it but the toctree. A better page can come later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 12, 2026
derek73
added a commit
that referenced
this pull request
Nov 12, 2026
#1353) * Add a getting-started page and lead README and the index with it Add docs/getting-started.rst: parse one name, let Parser.suggest() choose the settings for a list (choosing a language pack first where the list's language is known, and where it declines), and compare names with Parser.matching(), then a table of tasks linking the nine pages. README leads with the 3.1 features and the same three steps, keeps the one-liner block, and points to the pack pages instead of the Spanish, Vietnamese and strict-choice tour; its East Asian link points at east-asian.html. index.rst links the three steps and puts getting-started first under Start here. The rewrites PR #1343 left: usage.rst retitled "Working with a parsed name" with a new lead and Where next; its two passages duplicated in customize.rst cut to the report, the rules left in customize; customize's intro gives the order to try things in; locales' "East Asian names need no pack" cut to a pointer; "Contributing a pack to nameparser" moved to contributing.rst; shapes.rst's cross-page "below" fixed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Trim getting-started to its word target; hold the ES 'Lady Justice' reading README taught in a locales doctest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Say why a two-name list suggests nothing: one vote, one short Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the review's findings on the getting-started rewrite - usage: a Title-case surname-or-credential (Jack Ma) reports suffix-or-name; only capitals and periods settle it silently. Doctest added. customize's parenthetical names the Title-case lean too. - locales, README: a name only in katakana keeps the default order. - getting-started: suggest's shares stated against the names they count (order: names whose order votes agree; patronymic: names that cast any vote; trailing initials: names left after commas and titles-only); the given-name evidence is names rarely surnames (Mary, not John); initials_as_family only on a given-first base keeping middles apart; consistent defined by the accepted outcomes, with the opt-in ones and a name with no family name; as_dict shown; pass a list, not a reader; suggestion.base for the disagreeing names; set the order yourself wherever you know it. Trimmed back to its word target. - README: the report covers every setting considered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use a generic name in the suggest examples; fix the second review's findings - getting-started and README: Smith Mary / Mary Smith in place of the earlier example name, which may be a real person's; outputs re-run. - getting-started: an order needs two NAMES voting for it; the trailing-initial count is of initials nothing else in the name contradicts, and a name with only post-nominals after its comma counts; initials_as_family conditioned on a given-first base only (the code decides it under middle_as_family too); the disagreeing names MAY be misread; Python 3.11 and no other package restored. - usage: capitals settle an acronym such as MA, not a credential written as a word (KC, PC, DL), which the count decides and reports; doctest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first of two PRs restructuring the user docs by task. This one only moves text.
docs/usage.rst(12,680 words),docs/customize.rst(11,904) anddocs/locales.rst(8,600) are split into nine pages, anddocs/index.rstgroups the toctree under four captions. Every sentence, example and heading is moved verbatim. Rewording, the getting-started page and the README lead are left to the second PR (list below).Pages
wc -w)usageshapes(new)east-asian(new)suggest(new)matching(new)customizepolicy(new)localeslanguages(new)Toctree captions: Reading names (usage, shapes, east-asian), Lists of names (suggest, matching), Configuring (customize, policy, locales, languages), Background and reference (concepts, modules, migrate, release_log, contributing). The three existing file names are kept, so the release log's
:doc:links, the docstrings and README's absolute links still land on them.Also removed
docs/resources.rst("Naming Practices and Resources", 46 words) is deleted. It held eight external links, several out of date, and nothing linked to it but the toctree. A better page can come later. This is the one deliberate cut in the PR, and the word proof below covers only the three split pages.Proof that nothing was lost
Cut from
origin/masterat 5a07205. The first two commits are what make the move mechanically checkable.fe691f4, the move. The split script's output, plus the two new page titles, their leads and the toctree. A moved heading's underline character changes only where its level changed. Compared with the three old pages on
origin/master, with underline lines dropped from both sides and the four new title and lead lines dropped from the new side:Sections from one source file land on their page in source order, and the script's ledger shows no order violations. Raw
wc -wgoes from 33,184 to 33,246; the difference of 62 is the two titles (7 words), their two underlines (2) and the two leads (53).1de5d9e and the last commit, everything new. Their diff to the pages is exactly the new-text list below.
Doctests.
uv run sphinx-build -b doctest docs <dir>gives 776 tests, 0 failures;origin/mastergives 771 tests, 0 failures. Sphinx counts each>>>statement, and the 5 extra are the five import lines added here. Counting>>>/...lines on both sides: 684 old, 689 new, the 5 imports added and none lost.HTML.
uv run sphinx-build -W -b html docs <dir>exits 0 and prints nothing. The builtusage.htmlholdsid="east-asian-names"exactly once. Every.html#anchor in README.rst at v2.4.0, v2.8.0, v3.0.1 and HEAD resolves in the built pages:customize.html#configuring-by-reading,locales.html#reading-one-language-onlyandusage.html#east-asian-names.python -m doctest README.rstpasses.uv run pytestanduv run pytest -n0 -m serialpass, as douv run mypyanduv run ruff check, all re-run on the final commit. The clock-timed scaling checks intests/v2/test_benchmark.pyfailed intermittently while the machine was loaded (load average 13-22, other sessions running suites). Untouchedorigin/masterfailed them under the same load, every re-run on a quieter machine passed, and the PR touches no library code.New text, all of it
Page titles and one-sentence leads, for the two pages that have no moved heading to serve as a title:
shapes: "Names the parser reads", with the lead "The input forms the parser reads without configuration: how a name is arranged, the words that attach to their neighbors, nicknames and maiden names, and titles it was not told about."languages: "Notes by language", with the lead "What the shipped packs do for Czech, Slovak, Slovenian and Croatian names, Spanish and Portuguese titles, romanized Indic titles and Vietnamese names."The other four new pages take their moved heading as the title.
Import lines, one visible line at the head of each page's first doctest, for names the page used to borrow from an earlier block on its old page:
shapes:from nameparser import parseeast-asian:from nameparser import Lexicon, parsematching:from nameparser import Lexiconpolicy:from nameparser import Lexiconlanguages:from nameparser import Lexicon, Locale, Parser, locales, parse, parser_forTwo labels:
vocabulary-lexiconon Vocabulary: Lexicon andromanized-indic-titleson Romanized Indic titles.Eleven title links that no longer resolve on their page, rewritten as
:ref:`<same link text> <label>`with the link text unchanged:One in-page link retargeted: east-asian.rst's "
:doc:`customize` covers turning any of these behaviors off" now links ``:ref:east-asian-defaults```, the section on the same page that holds those switches. Its sentence is unchanged. The other in-page:doc:` links still point at the right page.The pointer in
usage.rst, where the East Asian section stood: a.. raw:: html<span id="east-asian-names"></span>and the line "East Asian names have a page of their own: :ref:east-asian-names." This keepsusage.html#east-asian-names, which every released README links to, landing on a pointer. The label itself moved with its section, since labels are global.References repointed
tests/v2/test_es_given_names.pychecks the "1,000 Spanish given names" phrase inlanguages.rstandpolicy.rst, where it now lives.tests/v2/test_locales.py(2),tests/v2/test_parser.py(2),tests/v2/test_properties.py,tests/v2/test_order_correspondence.pyandtests/v2/rules_doc.py;tools/differential/shapes.py;nameparser/locales/ja.py;docs/design/rules/W-scripts-and-writing-systems.md's pointer to the East Asian narrative.:doc:`customize`links whose subject moved now link the page it moved to. This changes the target only, never the entry's text.:doc:`policy`(lines 472, 500, 510, 605, 606): the family-first order settling a particle, the maiden markers and the maiden delimiters.:doc:`east-asian`(lines 565, 593, 599).Lexiconedits and stay oncustomize.docs/conf.py's comment on member order names thepolicy.rsttable.AGENTS.md:shapes.rstbesideusage.rst;docs/suggest.rst;docs/shapes.rst;east-asian.rst;.rstunderdocs/, not just two files.docs/AGENTS.mdlists the nine pages and says the model Policy table is nowpolicy.rst's.Left as they are, on purpose:
migrate.rst's "See :doc:customizefor the full set of knobs" closes the "Vocabulary constants → Lexicon.words" section, so it still means the Lexicon page.tests/v2/pipeline/test_classify.py's Catalan/Polish recipe is still oncustomize.rst.nameparser/vocab/AGENTS.mdmention the old pages as history, and history is kept.For the rewrite PR
contributing.rst. This PR's scope is the nine pages, so it stays at the end oflocales.rst.titles-also-given-names, the same way.east-asian.html.:doc:links could point at the section's label instead of the page.🤖 Generated with Claude Code