docs: add MkDocs API documentation with versioned GitHub Pages publishing#77
Conversation
…ishing Generate API reference from source docstrings/type hints via mkdocstrings, themed with Material. Publish versioned docs to gh-pages with mike (version picker dropdown, latest alias) on release or manual dispatch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds auto-generated, versioned API docs for the Python SDK using MkDocs + mkdocstrings, with automated publishing to GitHub Pages on releases.
Changes:
- Add a
docsoptional dependency group for MkDocs tooling. - Introduce MkDocs configuration and API reference pages under
docs/. - Add a GitHub Actions workflow and Makefile targets to build/serve/version and deploy docs via
mike.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds a docs dependency group for MkDocs/mkdocstrings/mike tooling. |
| mkdocs.yml | Configures MkDocs Material, mkdocstrings, nav structure, and mike versioning. |
| docs/index.md | Adds the docs homepage with installation and quick start content. |
| docs/api/*.md | Adds mkdocstrings-powered API reference pages per public subpackage. |
| Makefile | Adds docs, docs-serve, and docs-versions targets using uv. |
| .github/workflows/docs.yml | Builds and deploys versioned docs to gh-pages for releases and manual runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…inks
mike creates version aliases as symlinks by default, which GitHub Pages'
legacy branch builder rejects ("repository must not contain symlinks"),
causing the deployment to fail silently. --alias-type=copy writes real files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Include README.md via pymdownx.snippets so the docs home stays in sync with the repo README instead of duplicating content. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| tac = TAC(TACConfig( | ||
| api_key="SK...", | ||
| api_secret="...", | ||
| conversation_configuration_id="CF...", |
There was a problem hiding this comment.
| conversation_configuration_id="CF...", | |
| conversation_configuration_id="conv_configuration_xxx", |
There was a problem hiding this comment.
i change it to just point to our root readme.
| - Context: api/context.md | ||
| - Tools: api/tools.md | ||
| - Adapters: api/adapters.md | ||
| - Intelligence: api/intelligence.md |
There was a problem hiding this comment.
Does it make sense to call this "Conversation Intelligence"? Also wondering if we should link to https://www.twilio.com/docs/conversations/intelligence
There was a problem hiding this comment.
make sense. i update the title in markdown and add the links to the code comment so that we dont need to make many custom changes in the each module markdown file.
|
|
||
| ::: tac.context | ||
| options: | ||
| show_submodules: false |
- Link Conversation Memory, Enterprise Knowledge, and Conversation Intelligence product docs from client/module docstrings - Rename Intelligence nav/page to Conversation Intelligence - Harden docs workflow against shell injection via env vars - Twilio-branded logo, indigo palette, and README API Reference links
|
|
||
| Required for Conversation Orchestrator / Memory / Knowledge: | ||
| - TWILIO_CONVERSATION_CONFIGURATION_ID: Conversation Orchestrator configuration ID | ||
| **Required:** |
There was a problem hiding this comment.
Should we add in Claude.md to use markdown in comments (and that the comments etc. will be picked up docs)?
| signature_crossrefs: true | ||
| merge_init_into_class: true | ||
| filters: | ||
| ["!^_", "!^trigger_message_ready$", "!^trigger_interrupt$", "!^trigger_conversation_ended$", "!^register_partner_connector$", "!^is_orchestrator_enabled$"] |
There was a problem hiding this comment.
Should add a note to claude.md to keep this updated when adding/modifying any internal facing API methods?
There was a problem hiding this comment.
Maybe also mentioning in the CLAUDE.md for full public API reference to see the site so claude picks it up automatically for devs using the package
| @@ -0,0 +1,73 @@ | |||
| name: Docs | |||
|
|
|||
There was a problem hiding this comment.
remove dev version which is only for testing.
so the mike order the dropdown items based on name, non-numeric first then number, so dev show first... I just remove it.
when we have 2.2.0, it should be 2.2.0 -> 2.1.0. it should be good. then.
Note that docstrings render on the MkDocs API reference site, to write them in Markdown, to keep the mkdocstrings filters list current when changing internal-facing methods, and point to the published reference.
The deploy step interpolated steps.version.outputs.version straight into the shell script, so a crafted workflow_dispatch input could inject commands into a runner holding contents: write + Artifactory OIDC. Pass it through env: and reference "$VERSION", matching the Resolve version step.


Summary
Adds an auto-generated API documentation site for the Python SDK, published to GitHub Pages — the Python equivalent of the TypeDoc setup used by
twilio-voice.js.docs/with an intro page and one API page per public subpackage (Core, Channels, Context, Tools, Adapters, Conversation Intelligence, Models), each rendering the real public symbols fromsrc/tac.mikepublishes each release into its own subfolder with a version-picker dropdown in the header and alatestalias..github/workflows/docs.ymlbuilds and deploys to thegh-pagesbranch on every published release (and via manualworkflow_dispatch).make docs(build),make docs-serve(live preview),make docs-versions(list published versions). Added adocsdependency group topyproject.toml.CLAUDE.mddocuments that docstrings are published documentation — write them in Markdown, keep the mkdocstringsfilterslist current when changing internal-facing methods, and consult the published reference for the public surface.Review feedback addressed
workflow_dispatchinput / resolved version throughenv:and reference"$VERSION"in the run script, instead of interpolating${{ }}directly into the shell. This closes the path where a crafted dispatch input could inject commands into a runner holdingcontents: write+ Artifactory OIDC.CLAUDE.mdcovering docstring-as-published-docs conventions, keeping the mkdocstringsfilterslist current, and the published API reference URL.devversion from the published site so the dropdown shows only released versions (mikesorts non-numeric names above releases, sodevwas pinned to the top). The root already redirects tolatest.One-time setup required after merge
gh-pages/(root).workflow_dispatch"Run workflow" button only appears once this workflow is onmain.Type of Change
Checklist
SDK Parity
This is the Python SDK. If this change affects shared functionality, ensure the TypeScript SDK is updated as well.