Skip to content

[Feature] Generate Python API docs from module discovery#1392

Open
viiccwen wants to merge 4 commits into
apache:mainfrom
viiccwen:generate-api-from-module-discovery
Open

[Feature] Generate Python API docs from module discovery#1392
viiccwen wants to merge 4 commits into
apache:mainfrom
viiccwen:generate-api-from-module-discovery

Conversation

@viiccwen

@viiccwen viiccwen commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Related Issues

Closes #1347
previous PR #1381 (merge first)

Changes

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Why

The Python API reference should be generated from the agreed public module surface instead of maintaining pydoc-markdown module lists by hand. Manual lists can drift from the current qumat and qumat_qdp source tree, while a deterministic generation path makes the website API docs easier to refresh and review as the Python packages evolve.

This keeps /docs/api as the source for API documentation generation settings and metadata, while publishing the rendered API pages through the Docusaurus website docs tree.

How

  • Update the website docs sync script so it skips copying raw docs/api generator config directly and instead renders API pages into website/docs/api.
  • Add the Python API generation step to website/scripts/sync-docs.js, including the qumat and qumat_qdp pydoc-markdown configs.
  • Switch the Docusaurus docs source to website/docs so the generated API pages are included with the synced website docs.
  • Add an experimental API Reference sidebar section for the generated qumat and qumat_qdp pages.
  • Document the local website preview command in CONTRIBUTING.md.

Screenshot

image image

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes

@viiccwen viiccwen changed the title feat(website): generate Python API docs from module discovery Generate Python API docs from module discovery Jun 8, 2026
@viiccwen viiccwen changed the title Generate Python API docs from module discovery [Feature] Generate Python API docs from module discovery Jun 8, 2026
@viiccwen

viiccwen commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

It's normal that website build failed before #1381 got merged (already tested correctly in local environment).

@viiccwen

viiccwen commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

cc @400Ping 🙌

@viiccwen viiccwen force-pushed the generate-api-from-module-discovery branch 2 times, most recently from a8a3ec1 to ef54e73 Compare June 13, 2026 16:53
@400Ping

400Ping commented Jun 15, 2026

Copy link
Copy Markdown
Member

Please fix the pre-commit error

@viiccwen viiccwen force-pushed the generate-api-from-module-discovery branch from 167cce5 to 9194428 Compare June 15, 2026 03:16
@viiccwen viiccwen force-pushed the generate-api-from-module-discovery branch from d6f11d2 to a1334cd Compare June 15, 2026 05:18
@viiccwen

Copy link
Copy Markdown
Contributor Author

It's Failed bcz it need uv for sync documentations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Generate Python API pages from public module discovery

2 participants