docs: drop redundant Field(description=...) on five pydantic models#2577
Merged
juanitorduz merged 3 commits intoMay 19, 2026
Merged
Conversation
Closes pymc-labs#1700. Numpydoc Parameters block in each class docstring is now the sole source of field documentation, matching the rest of the codebase. No runtime consumer reads pydantic Field descriptions today, so removing them is safe.
This was referenced May 16, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2577 +/- ##
=======================================
Coverage 93.91% 93.91%
=======================================
Files 93 93
Lines 14226 14226
=======================================
Hits 13360 13360
Misses 866 866 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
juanitorduz
approved these changes
May 19, 2026
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.
Closes #1700.
Alternative to #2572 (option A from my issue comment).
Drops the
Field(description=...)text onHSGPKwargsand the four scaling classes (VariableScaling,DataDerivedScaling,FixedScaling,Scaling). The numpydocParametersblock in each class docstring is now the sole source of field documentation, matching the rest of the codebase. No code outside these files changes: no new dependency, noconf.pychanges, no autosummary template changes.No runtime consumer reads the pydantic
Fielddescriptions today (verified via grep), so removing them is safe. If a future feature needs them (e.g. OpenAPI export, JSON-schema docs), they can come back on the fields that need them.Trade-off vs #2572 (option B):
autodoc-pydanticand an autosummary tweak.descriptionmetadata is gone at runtime; B: it stays.Pairs with #2572. Pick one, close the other.
📚 Documentation preview 📚: https://pymc-marketing--2577.org.readthedocs.build/en/2577/