Skip to content

Conversation

@nanxstats
Copy link
Collaborator

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.

  • Enable the griffe-pydantic extension in Zensical mkdocstrings configuration.
  • Set force_inspection = false to render Pydantic models correctly.
  • Declare RTFDocument._table_space as a private attribute to avoid render errors in static mode.
  • Update monospace font to use system font stack.
  • Update extra.css to style new elements introduced by the extension.

The key visible changes include:

  • Rich field/validator sections for Pydantic models.
  • Expandable "Show JSON schema" element for the classes.
  • The symbol type (class, attribute, method, func) shown before each symbol name.

Copy link
Contributor

Copilot AI left a 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-pydantic extension with mkdocstrings configuration for enhanced Pydantic model rendering
  • Fix a private attribute declaration in RTFDocument to 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.

@elong0527 elong0527 merged commit c163a7c into main Jan 8, 2026
9 checks passed
@nanxstats nanxstats deleted the mkdocstrings branch January 8, 2026 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Pydantic field rendering on documentation site

3 participants