Add documentation for MkDocs setup and API reference#257
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an MkDocs-based documentation site (Material theme) with mkdocstrings-generated API reference, plus a GitHub Actions workflow to build and publish the docs to GitHub Pages.
Changes:
- Add a
docsoptional-dependency group inpyproject.tomlfor MkDocs/mkdocstrings tooling. - Introduce
mkdocs.ymland initial docs pages (docs/index.md,docs/api.md) including mkdocstrings directives. - Add
.github/workflows/docs.ymlto build the site and deploy it to GitHub Pages on pushes/tags.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Adds docs extras for MkDocs, Material theme, mkdocstrings, and markdown extensions. |
mkdocs.yml |
Defines MkDocs site configuration, theme, mkdocstrings plugin, and navigation. |
docs/index.md |
Adds a documentation landing page and local preview instructions. |
docs/api.md |
Adds mkdocstrings-based API reference entries for package + Triton interface. |
.github/workflows/docs.yml |
Builds MkDocs site in CI and deploys to GitHub Pages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| nav: | ||
| - API: api.md | ||
|
|
There was a problem hiding this comment.
nav only includes api.md, so docs/index.md (and existing hand-written docs like docs/api_reference*.md) won’t appear in the generated site when nav is defined. This conflicts with the stated goal of combining existing docs + generated API and also makes the homepage inaccessible from the navigation. Consider adding index.md (Home) and the existing documentation pages to nav (or removing nav until the structure is defined).
| nav: | |
| - API: api.md |
| - name: Install documentation dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install mkdocs mkdocs-material "mkdocstrings[python]" pymdown-extensions | ||
|
|
||
| - name: Install runtime imports needed for API docs | ||
| run: | | ||
| pip install torch --index-url https://download.pytorch.org/whl/cpu | ||
| pip install triton | ||
|
|
||
| - name: Install package without dependency resolution | ||
| run: pip install -e . --no-deps |
There was a problem hiding this comment.
The workflow installs MkDocs dependencies by hand, even though a docs extra was added to pyproject.toml. This duplicates the dependency list and can drift (e.g., local pip install -e .[docs] vs CI). Consider installing .[docs] in the workflow (and relying on the project’s version constraints) and only separately installing runtime-only deps that aren’t declared (e.g., torch if intentionally not a package dependency).
Enhance project documentation by adding MkDocs configuration, initial index, and API reference generated from Python docstrings. Include a GitHub Actions workflow for automated documentation publishing. This update improves accessibility and usability of the documentation.