Generate module doc from pybind11
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I was trying to generate a simple api doc from a pybind11 implementation. After multiple attempts, the issue seems to be related to the signature while generating the module function arguments.
ValueError: no signature found for builtin <built-in method test_clone_ptr of PyCapsule object at 0x7f1ef5783b70>
On the second attempt, i managed to generate the html docs successfully, after adding this into the code within my pybind11 impl
PYBIND11_MODULE(module, m) {
py::options options;
options.disable_function_signatures();
During the docs generation, the terminal is prompted with:
_html_mako:326: UserWarning: Error handling return annotation for <Function
The resulted html doc is generated with missing args description within the class function. On the other hand, I managed to generate the doc with pydoc3, without issue.
Here I would hope to seek help in getting the right method to generate a doc from a pybind11 python module.
Let me know again if my description is unclear, I can provide you with the code for this issue. Thanks a lot!
Additional info
- ubuntu 20.04
- pdoc version: 0.9.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the pdoc 0.9.2 documentation generation with a pybind11 module on Ubuntu 20.04, first with and then without disable_function_signatures(). Inspect the generated HTML and warning output to determine how the builtin method signature and arguments are handled; done means the behavior is fixed or the limitation is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100