-
Notifications
You must be signed in to change notification settings - Fork 0
Update mkdocstrings config to render Pydantic field metadata #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Adjust force inspection setting in `zensical.toml` for proper Pydantic model rendering. - Declare `RTFDocument._table_space` as a private attribute to avoid render errors in static mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enhances the documentation rendering for Pydantic models by integrating the griffe-pydantic extension into the mkdocstrings configuration. The changes enable richer API documentation with field metadata, validators, and JSON schemas.
Key changes:
- Integrate
griffe-pydanticextension with mkdocstrings configuration for enhanced Pydantic model rendering - Fix a private attribute declaration in
RTFDocumentto prevent static mode render errors - Update CSS styling to accommodate new documentation elements and switch to system font stack
Reviewed changes
Copilot reviewed 8 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| zensical.toml | Configure mkdocstrings with griffe-pydantic extension and related rendering options |
| src/rtflite/encode.py | Import PrivateAttr and declare _table_space as a Pydantic private attribute |
| src/rtflite/input.py | Add backticks around parameter and class names in docstrings for better formatting |
| pyproject.toml | Add griffe-pydantic dependency to dev requirements |
| docs/stylesheets/extra.css | Remove JetBrains Mono font declarations, switch to system font stack, and add styles for new documentation elements |
| docs/changelog.md | Document the mkdocstrings configuration updates |
| CHANGELOG.md | Document the mkdocstrings configuration updates |
| .github/workflows/docs.yml | Add griffe-pydantic to CI dependency installation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Fixes #188
This PR updates the mkdocstrings configuration to properly render Pydantic field metadata on the Zensical site, mostly ported from the pydantic mkdocs.yml.
griffe-pydanticextension in Zensical mkdocstrings configuration.force_inspection = falseto render Pydantic models correctly.RTFDocument._table_spaceas a private attribute to avoid render errors in static mode.extra.cssto style new elements introduced by the extension.The key visible changes include: