Skip to content

Commit df01bef

Browse files
kozo2LittleCoinCoin
authored andcommitted
docs: enhance documentation with API references and mkdocstrings integration (#65)
1 parent d81a011 commit df01bef

File tree

9 files changed

+128
-3
lines changed

9 files changed

+128
-3
lines changed

.readthedocs.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ mkdocs:
1717
# Optionally, but recommended,
1818
# declare the Python requirements required to build your documentation
1919
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20-
# python:
21-
# install:
22-
# - requirements: docs/requirements.txt
20+
python:
21+
install:
22+
- requirements: docs/requirements.txt

docs/api.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# API Reference
2+
3+
This section contains the complete API reference for the Hatchling project.
4+
5+
## Overview
6+
7+
Hatchling is a Python application that provides a chat interface with LLM integration and MCP (Model Context Protocol) support.
8+
9+
## Package Structure
10+
11+
- [Core Modules](api/core.md) - Core functionality including chat, LLM, and logging
12+
- [Configuration](api/config.md) - Settings and configuration management
13+
- [UI Components](api/ui.md) - User interface and command handling
14+
- [MCP Utils](api/mcp_utils.md) - Model Context Protocol utilities
15+
- [Main Application](api/app.md) - Main application entry point
16+
17+
## Quick Start
18+
19+
```python
20+
from hatchling import app
21+
# See individual module documentation for usage examples
22+
```

docs/api/app.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Main Application API
2+
3+
::: hatchling.app
4+
5+
This module contains the main entry point for the Hatchling application.

docs/api/config.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Configuration API
2+
3+
::: hatchling.config
4+
5+
## Settings Management
6+
7+
::: hatchling.config.settings
8+
::: hatchling.config.settings_registry
9+
::: hatchling.config.settings_access_level
10+
11+
## LLM Settings
12+
13+
::: hatchling.config.llm_settings
14+
::: hatchling.config.openai_settings
15+
::: hatchling.config.ollama_settings
16+
17+
## Other Settings
18+
19+
::: hatchling.config.path_settings
20+
::: hatchling.config.tool_calling_settings
21+
::: hatchling.config.ui_settings
22+
23+
## Internationalization
24+
25+
::: hatchling.config.i18n
26+
27+
## Languages
28+
29+
::: hatchling.config.languages

docs/api/core.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Core Modules API
2+
3+
::: hatchling.core
4+
5+
## Chat Module
6+
7+
::: hatchling.core.chat
8+
9+
## LLM Module
10+
11+
::: hatchling.core.llm
12+
13+
## Logging Module
14+
15+
::: hatchling.core.logging

docs/api/mcp_utils.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# MCP Utils API
2+
3+
::: hatchling.mcp_utils
4+
5+
## Core MCP Components
6+
7+
::: hatchling.mcp_utils.client
8+
::: hatchling.mcp_utils.manager
9+
::: hatchling.mcp_utils.mcp_server_api
10+
11+
## Tool Management
12+
13+
::: hatchling.mcp_utils.mcp_tool_call_subscriber
14+
::: hatchling.mcp_utils.mcp_tool_data
15+
::: hatchling.mcp_utils.mcp_tool_execution
16+
::: hatchling.mcp_utils.mcp_tool_lifecycle_subscriber

docs/api/ui.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# UI Components API
2+
3+
::: hatchling.ui
4+
5+
## Command System
6+
7+
::: hatchling.ui.abstract_commands
8+
::: hatchling.ui.base_commands
9+
::: hatchling.ui.chat_command_handler
10+
::: hatchling.ui.command_completion
11+
::: hatchling.ui.command_lexer
12+
13+
## Chat Interface
14+
15+
::: hatchling.ui.cli_chat
16+
::: hatchling.ui.cli_event_subscriber
17+
18+
## Specific Commands
19+
20+
::: hatchling.ui.hatch_commands
21+
::: hatchling.ui.mcp_commands
22+
::: hatchling.ui.model_commands
23+
::: hatchling.ui.settings_commands

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mkdocstrings
2+
mkdocstrings-python

mkdocs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,25 @@ nav:
2323
- Event System Architecture: articles/devs/event_system_architecture.md
2424
- i18n Support: articles/devs/i18n_support.md
2525
- Contributing: articles/devs/CONTRIBUTING.md
26+
- API Reference: api.md
2627
- Appendices:
2728
- Glossary: articles/appendices/glossary.md
2829
- Changelog: CHANGELOG.md
2930

3031
plugins:
3132
- search
33+
- mkdocstrings:
34+
handlers:
35+
python:
36+
options:
37+
show_source: true
38+
show_root_heading: true
39+
show_root_toc_entry: false
40+
heading_level: 2
41+
show_category_heading: true
42+
show_labels: true
43+
show_symbol_type_heading: true
44+
show_symbol_type_toc: true
3245

3346
markdown_extensions:
3447
- admonition

0 commit comments

Comments
 (0)