Update mkdocstrings config to render Pydantic field metadata#189
Merged
Update mkdocstrings config to render Pydantic field metadata#189
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.
Contributor
There was a problem hiding this comment.
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 <175728472+Copilot@users.noreply.github.com>
elong0527
approved these changes
Jan 8, 2026
elong0527
approved these changes
Jan 8, 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.
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: