Publish pdoc reference to GitHub Pages, expose snake_case API only - #3
Merged
Conversation
Add a docs workflow that regenerates the API reference from the released browser binary with pdoc and deploys it to GitHub Pages on release (or by hand for any browser tag). The site lands at lightpanda.io/lightpanda-python/ since the org serves lightpanda.io from Pages. Drop the camelCase method aliases and convert tool parameters to snake_case in the generated methods (wait_for_selector, backend_node_id, max_depth, ...). Session.call maps snake_case kwargs back to the schema's property names and still accepts the raw MCP tool and parameter names as the escape hatch. Attribute lookup no longer resolves camelCase names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs on GitHub Pages
.github/workflows/docs.yml, modeled on zignal'sdocumentation.ymlminus the Zig half: onrelease: published(orworkflow_dispatchwith a browser tag,nightlyincluded) it downloads the release's Linux binary, sets the package version from the tag likewheels.yml, runsscripts/build_docs.py(regenerates the methods, then pdoc) and deploysdocs/withactions/deploy-pages.Superseded after merge: commit 8198b03 on
mainremovesdocs.ymland the Pages site again. The reference is now published at https://lightpanda.io/docs/python/ by the docs repo, which regenerates it from the PyPI package (lightpanda-io/docs#92).snake_case API only
Python users get one idiomatic spelling instead of two:
scripts/generate_methods.pyno longer emits camelCase aliases and converts parameter names to snake_case (backend_node_id,max_depth,max_bytes,wait_until,full_page). It fails if two properties would collide after conversion.Session.callmaps snake_case kwargs back to the schema's property names, and still accepts the raw MCP tool and parameter names as the escape hatch (call("tree", maxDepth=1)).__getattr__fallback resolves snake_case names only, sopage.getUrlnow raisesAttributeError.lightpanda/_methods.pyregenerated; tests cover the mapping in both the sync and async facades.Breaking for anyone using the camelCase names, but nothing in the repo did, the package is unpublished, and the README already states there is no backward-compatibility guarantee.