Skip to content

Commit 6f7fdf1

Browse files
bokelleyclaude
andauthored
feat: Add API reference documentation with pdoc3 (#59)
* feat: Add API reference documentation with pdoc3 Implements automated API documentation generation: - Added pdoc3 as optional dependency in [project.optional-dependencies] - Created GitHub Actions workflow to build and deploy docs on push to main - Updated README with API reference links and documentation section - Added docs/api/ to .gitignore (generated content) Documentation will be automatically published to GitHub Pages at: https://adcontextprotocol.github.io/adcp-client-python/ Benefits: - Zero-config API reference from existing docstrings - Full type signature visibility - Field descriptions from Pydantic/JSON Schema - Searchable interface - Mobile-friendly HTML 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore: Regenerate types to fix import errors Regenerated all type files to sync timestamps and ensure imports match. This fixes the CI error where generated.py was trying to import Asset1 which didn't exist in brand_manifest.py. The issue occurred because types were out of sync between generated module files and the consolidated generated.py exports. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent c23caf0 commit 6f7fdf1

File tree

4 files changed

+57
-1
lines changed

4 files changed

+57
-1
lines changed

.github/workflows/docs.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
release:
7+
types: [published]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
docs:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v3
24+
25+
- name: Install dependencies
26+
run: |
27+
uv pip install --system -e ".[docs]"
28+
29+
- name: Build docs
30+
run: |
31+
pdoc --html --output-dir docs/api adcp
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v4
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: docs/api/adcp

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ instance/
6565
# Sphinx documentation
6666
docs/_build/
6767

68+
# pdoc3 documentation
69+
docs/api/
70+
6871
# PyBuilder
6972
.pybuilder/
7073
target/

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,18 @@ async with ADCPMultiAgentClient(
138138
# Connections automatically cleaned up here
139139
```
140140

141+
## Documentation
142+
143+
- **[API Reference](https://adcontextprotocol.github.io/adcp-client-python/)** - Complete API documentation with type signatures and examples
144+
- **[Protocol Spec](https://github.com/adcontextprotocol/adcp)** - Ad Context Protocol specification
145+
- **[Examples](examples/)** - Code examples and usage patterns
146+
147+
The API reference documentation is automatically generated from the code and includes:
148+
- Full type signatures for all methods
149+
- Field descriptions from JSON Schema
150+
- Method documentation with examples
151+
- Searchable interface
152+
141153
## Features
142154

143155
### Test Helpers
@@ -762,6 +774,7 @@ Apache 2.0 License - see [LICENSE](LICENSE) file for details.
762774

763775
## Support
764776

765-
- **Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
777+
- **API Reference**: [adcontextprotocol.github.io/adcp-client-python](https://adcontextprotocol.github.io/adcp-client-python/)
778+
- **Protocol Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org)
766779
- **Issues**: [GitHub Issues](https://github.com/adcontextprotocol/adcp-client-python/issues)
767780
- **Protocol Spec**: [AdCP Specification](https://github.com/adcontextprotocol/adcp)

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ dev = [
4747
"ruff>=0.1.0",
4848
"datamodel-code-generator[http]>=0.35.0",
4949
]
50+
docs = [
51+
"pdoc3>=0.10.0",
52+
]
5053

5154
[project.urls]
5255
Homepage = "https://github.com/adcontextprotocol/adcp-client-python"

0 commit comments

Comments
 (0)