Skip to content

Publish the Python SDK API reference at /docs/python from PyPI with pdoc - #92

Closed
arrufat wants to merge 3 commits into
mainfrom
python-reference-workflow
Closed

Publish the Python SDK API reference at /docs/python from PyPI with pdoc#92
arrufat wants to merge 3 commits into
mainfrom
python-reference-workflow

Conversation

@arrufat

@arrufat arrufat commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Adds .github/workflows/python-reference.yml: daily (or by hand) it installs the lightpanda package from PyPI, runs pdoc into public/python, and opens a pull request on the python-reference branch when the output changed. The static export copies public/ verbatim, so the website serves the reference at https://lightpanda.io/docs/python/ after the usual submodule bump. No browser binary or cross-repo token is involved: the wheel already bundles the generated tool methods.

  • public/python is seeded from the 0.4.0 package so the page exists on the next website deploy. pdoc's output is deterministic, so the scheduled run stays quiet until a new package is published.
  • Biome now ignores public (the generated search.js is not ours to lint).
  • The pypi.org/project/lightpanda reference page and guide will link this URL (Python SDK docs: snake_case names and generated API reference link #91).

Note for an admin: the workflow creates the pull request with GITHUB_TOKEN, which needs "Allow GitHub Actions to create and approve pull requests" enabled under Settings → Actions → General. If it is off, the branch still gets pushed and the run fails at the gh pr create step with that message.

Add a workflow that regenerates public/python with pdoc from the lightpanda
package on PyPI (daily, or by hand) and opens a pull request when the output
changed. The static export copies public/ verbatim, so the website serves it
at lightpanda.io/docs/python/ after the usual submodule bump. Seed it with
the 0.4.0 package so the page exists on the next deploy, and keep Biome off
the generated search.js.
Point the hand-written Python SDK reference and the Python guide at the
pdoc output published at lightpanda.io/docs/python/, with per-anchor links
for Browser, AsyncBrowser, Session, AsyncSession, run_script and the error
classes, and a pointer from the Calling an action section to the full
method signatures.
# Conflicts:
#	src/content/guides/use-python.mdx
#	src/content/reference/python.mdx
@arrufat

arrufat commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator Author

Closing: we are not publishing the pdoc reference for now. The docs links are removed in the follow-up PR instead.

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.

1 participant