Skip to content

docs: drop redundant Field(description=...) on five pydantic models#2577

Merged
juanitorduz merged 3 commits into
pymc-labs:mainfrom
anevolbap:fix/1700-numpydoc-single-source
May 19, 2026
Merged

docs: drop redundant Field(description=...) on five pydantic models#2577
juanitorduz merged 3 commits into
pymc-labs:mainfrom
anevolbap:fix/1700-numpydoc-single-source

Conversation

@anevolbap
Copy link
Copy Markdown
Contributor

@anevolbap anevolbap commented May 16, 2026

Closes #1700.

Alternative to #2572 (option A from my issue comment).

Drops the Field(description=...) text on HSGPKwargs and the four scaling classes (VariableScaling, DataDerivedScaling, FixedScaling, Scaling). The numpydoc Parameters block 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, no conf.py changes, no autosummary template changes.

No runtime consumer reads the pydantic Field descriptions 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):

  • A keeps rendering identical to main; B switches pydantic class pages to autodoc-pydantic style.
  • A: no new dep; B: adds autodoc-pydantic and an autosummary tweak.
  • A: pydantic description metadata 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/

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.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.91%. Comparing base (d0c69a5) to head (16c0f3b).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anevolbap anevolbap marked this pull request as ready for review May 17, 2026 12:13
@juanitorduz juanitorduz enabled auto-merge (squash) May 19, 2026 17:25
@juanitorduz juanitorduz merged commit 2717e9d into pymc-labs:main May 19, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation MMM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pydantic description, numpy docstring consolidation

2 participants