Skip to content

docs: refine the documents#4259

Merged
lvhan028 merged 1 commit intoInternLM:mainfrom
windreamer:gen_openapi_doc
Jan 8, 2026
Merged

docs: refine the documents#4259
lvhan028 merged 1 commit intoInternLM:mainfrom
windreamer:gen_openapi_doc

Conversation

@windreamer
Copy link
Copy Markdown
Collaborator

Motivation

This PR aims to systematically improve the documentation quality and maintainability of the LMDeploy project. The existing documentation had inconsistencies in formatting, suboptimal Sphinx configuration, and outdated code examples that hindered readability and API reference generation. Additionally, the lack of proper type hint documentation diminished the developer experience when navigating the codebase.

Modification

This is a comprehensive documentation refinement with three core improvement areas:

  1. Sphinx Configuration Modernization
    Reorganized and extended the Sphinx extensions list for better build performance and functionality. Added sphinx-autodoc-typehints for automatic type annotation rendering and configured autodoc_type_aliases to properly handle Pydantic dataclasses, enabling cleaner API documentation generation.

  2. Documentation Format Standardization
    Applied consistent capitalization rules across all heading levels in RST files and standardized TOML configuration examples by enforcing quoted string values and lowercase boolean literals. Merged fragmented configuration class documentations into unified sections to improve scannability.

  3. API Documentation Enhancement
    Refactored Python docstrings to use proper Sphinx directives (e.g., code-block, inline literals) instead of plain text examples. Updated parameter descriptions to remove redundant type annotations (following Sphinx best practices) and replaced generic returns with specific type hints. This produces more accurate and navigable API references while maintaining backward compatibility.

The changes are purely documentation-focused and do not affect runtime functionality.

@lvhan028 lvhan028 merged commit 331be3a into InternLM:main Jan 8, 2026
5 checks passed
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.

2 participants