lvgl / lv_binding_micropython

LVGL binding for MicroPython
MIT License
259 stars 164 forks source link

Automatic documentation generation #360

Open andrewleech opened 2 weeks ago

andrewleech commented 2 weeks ago

This feature suggestion was raised by @mattytrentini as we work on updates to the micropython / bindings integration.

The generated python functions all follow the underlying C functions, however there's some changes to structure and arguments with the use of python classes etc. The C files in lvgl have docstrings.

It would be a really nice addition to the bindings generator if it also generated docs for the python files as it works, merging any docstrings from the C files into function definitions as generated for python. Bonus points for including links back to the original C files in the docs for each function / file.

This could also generate .pyi stub files that could be used for static typing / autocompletion in vscode etc.