rules/python/source-derived-name.md
Name a declaration or a string option in Literal[...] after its purpose. Rename a function, class, parameter, variable or option that contains a configured source word and update its uses.
| 1 | [tool.xpd.references] |
| 2 | name-paths = ["src", "tests"] |
| 3 | banned-words = ["webel", "mstl"] |
| 4 | surname-directory = "papers" |
| 5 | title-acronym-paths = ["src"] |
All keys are optional. Paths are files or directories relative to the project file. Without name-paths, the rule checks the project. Without any source words, it is off.
The rule adds the leading lowercase surname from immediate subdirectories named like webel2025study to the explicit word list. The surname must have at least four letters followed by four digits. It also collects acronyms that open quoted titles in numpydoc References sections under title-acronym-paths, such as "MSTL: A Seasonal-Trend ...".
Matching ignores case and splits snake case and camel case into words. A source word of six or more characters also matches within the name after underscores are removed.