diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..a26bd9d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,37 @@ +name: Build and Deploy Docs + +on: + push: + branches: [main] + release: + types: [published] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Install dependencies + run: | + uv pip install --system -e ".[docs]" + + - name: Build docs + run: | + pdoc --html --output-dir docs/api adcp + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/api/adcp diff --git a/.gitignore b/.gitignore index 68ca1bc..bfae690 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,9 @@ instance/ # Sphinx documentation docs/_build/ +# pdoc3 documentation +docs/api/ + # PyBuilder .pybuilder/ target/ diff --git a/README.md b/README.md index a8adf82..797309b 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,18 @@ async with ADCPMultiAgentClient( # Connections automatically cleaned up here ``` +## Documentation + +- **[API Reference](https://adcontextprotocol.github.io/adcp-client-python/)** - Complete API documentation with type signatures and examples +- **[Protocol Spec](https://github.com/adcontextprotocol/adcp)** - Ad Context Protocol specification +- **[Examples](examples/)** - Code examples and usage patterns + +The API reference documentation is automatically generated from the code and includes: +- Full type signatures for all methods +- Field descriptions from JSON Schema +- Method documentation with examples +- Searchable interface + ## Features ### Test Helpers @@ -762,6 +774,7 @@ Apache 2.0 License - see [LICENSE](LICENSE) file for details. ## Support -- **Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org) +- **API Reference**: [adcontextprotocol.github.io/adcp-client-python](https://adcontextprotocol.github.io/adcp-client-python/) +- **Protocol Documentation**: [docs.adcontextprotocol.org](https://docs.adcontextprotocol.org) - **Issues**: [GitHub Issues](https://github.com/adcontextprotocol/adcp-client-python/issues) - **Protocol Spec**: [AdCP Specification](https://github.com/adcontextprotocol/adcp) diff --git a/pyproject.toml b/pyproject.toml index d98a2f0..9bc552c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,9 @@ dev = [ "ruff>=0.1.0", "datamodel-code-generator[http]>=0.35.0", ] +docs = [ + "pdoc3>=0.10.0", +] [project.urls] Homepage = "https://github.com/adcontextprotocol/adcp-client-python"