Skip to content

docs: migrate documentation from Sphinx/Read the Docs to VitePress with GitHub Pages deployment#146

Merged
erwindouna merged 6 commits intoerwindouna:mainfrom
nixel2007:feature/migrate-from-read-the-docs
Mar 1, 2026
Merged

docs: migrate documentation from Sphinx/Read the Docs to VitePress with GitHub Pages deployment#146
erwindouna merged 6 commits intoerwindouna:mainfrom
nixel2007:feature/migrate-from-read-the-docs

Conversation

@nixel2007
Copy link
Contributor

Summary

Migrate the documentation system from Sphinx/Read the Docs to VitePress with GitHub Pages deployment.

Changes

  • Replace Sphinx/Read the Docs with VitePress for documentation
  • Add GitHub Pages deployment workflow (triggered on main branch)
  • Auto-generate API docs from Python source code using pydoc-markdown
  • Add documentation deployment badge to README.md
  • Configure VitePress with search, base path, and proper styling

Copilot AI review requested due to automatic review settings February 19, 2026 07:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates the project documentation from Sphinx/Read the Docs to a VitePress-based site published via GitHub Pages, with API reference pages generated from the Python source using pydoc-markdown.

Changes:

  • Add a docs generation script (pydoc-markdown → Markdown) and wire it into VitePress build/dev commands.
  • Introduce a GitHub Pages deployment workflow for the VitePress site and update README badge/links.
  • Remove the previous Sphinx/Read the Docs configuration and source files.

Reviewed changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
scripts/generate_docs.py New script to generate docs/api.md, docs/models.md, docs/exceptions.md via pydoc-markdown.
pyproject.toml Ruff per-file ignore tweak for scripts/*.
package.json Add docs scripts (generate/dev/build/preview) and VitePress dependency.
package-lock.json Lockfile updates for VitePress and its transitive dependencies.
docs/usage.md New Markdown usage page for VitePress docs.
docs/index.md New VitePress home page frontmatter/content.
docs/.vitepress/config.mts VitePress site configuration (nav/sidebar/search/base).
README.md Switch documentation badge/link from Read the Docs to GitHub Pages.
.github/workflows/deploy-docs.yaml New workflow to build and deploy docs to GitHub Pages.
.prettierignore Ignore VitePress build artifacts and generated API docs.
.gitignore Ignore VitePress build artifacts and generated API docs.
.readthedocs.yaml Remove Read the Docs build configuration.
docs/requirements.txt Remove Sphinx requirements.
docs/Makefile Remove Sphinx Makefile.
docs/make.bat Remove Sphinx Windows build script.
docs/__init__.py Remove docs package marker (Sphinx-era).
docs/source/conf.py Remove Sphinx configuration.
docs/source/index.rst Remove Sphinx index page.
docs/source/usage.rst Remove Sphinx usage page.
docs/source/api.rst Remove Sphinx API module page.
docs/source/models.rst Remove Sphinx models reference page.
docs/source/__init__.py Remove docs source package marker (Sphinx-era).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

package.json Outdated
"docs:generate": "python3 scripts/generate_docs.py",
"docs:dev": "npm run docs:generate && vitepress dev docs",
"docs:build": "npm run docs:generate && vitepress build docs",
"docs:preview": "vitepress preview docs"
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs:preview script runs vitepress preview docs without ensuring the site has been built first. Since vitepress preview serves the build output, this should typically depend on docs:build (and/or docs:generate) to avoid preview failing on a clean checkout.

Suggested change
"docs:preview": "vitepress preview docs"
"docs:preview": "npm run docs:build && vitepress preview docs"

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Copilot right here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

with:
python-version: "3.12"
- name: 🏗 Install pydoc-markdown
run: pip install pydoc-markdown
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow installs pydoc-markdown via pip install directly, which bypasses the repo’s existing uv-based, locked dependency approach used in other workflows. To make docs builds reproducible, consider adding pydoc-markdown to the project’s dev dependencies and using uv sync/uv run here as well (or at least pin the installed version).

Suggested change
run: pip install pydoc-markdown
run: pip install pydoc-markdown==4.8.2

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use PIP, bu UV instead. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

@wmalgadey wmalgadey added documentation Solely about the documentation of the project enhancement Enhancement of the code, not introducing new features labels Feb 19, 2026
@erwindouna
Copy link
Owner

There are some merge conflicts now, can you please have a look? :)

nixel2007 and others added 2 commits February 26, 2026 16:06
…th GitHub Pages deployment

- Replace Sphinx/Read the Docs with VitePress for documentation
- Add GitHub Pages deployment workflow (triggered on main branch)
- Auto-generate API docs from Python source code using pydoc-markdown
- Add documentation deployment badge to README.md
- Configure VitePress with search, base path, and proper styling

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix Tado() constructor usage example to use refresh_token
- Add async_init() guidance for non-context-manager usage
- Use absolute path for -I src in generate_docs.py
- Add encoding='utf-8' to write_text() and ensure docs dir exists
- Make docs:preview depend on docs:build
- Use uv instead of pip for pydoc-markdown install in CI

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nixel2007 nixel2007 force-pushed the feature/migrate-from-read-the-docs branch from 304c3f8 to bfd87d1 Compare February 26, 2026 15:11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nixel2007 nixel2007 force-pushed the feature/migrate-from-read-the-docs branch from 4750cb4 to 3ed14ed Compare February 26, 2026 15:21
Use pydoc-markdown YAML config with documented_only: false and
render_typehint_in_data_header to display dataclass fields with
their types. Filter out module-level imports while keeping class
members.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nixel2007 nixel2007 marked this pull request as draft February 26, 2026 15:27
Add runtime introspection to enrich pydoc-markdown output with
inherited methods (e.g. add_note, with_traceback for exceptions).
Install project deps in CI via uv sync and run generate_docs.py
through uv run for proper module resolution.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nixel2007 nixel2007 marked this pull request as ready for review February 26, 2026 15:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@erwindouna
Copy link
Owner

You're making some progress here. Let me know when you deem it ready. Further improvement can be made via new PR's. :)

@nixel2007
Copy link
Contributor Author

@erwindouna this is ready for review

@erwindouna
Copy link
Owner

I think this looks great and we can expand further on this. Thanks @nixel2007!

@erwindouna erwindouna merged commit 9746907 into erwindouna:main Mar 1, 2026
11 checks passed
@nixel2007 nixel2007 deleted the feature/migrate-from-read-the-docs branch March 1, 2026 08:49
@github-actions github-actions bot locked and limited conversation to collaborators Mar 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Solely about the documentation of the project enhancement Enhancement of the code, not introducing new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants