-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add auto generated Lua docs #3865
base: master
Are you sure you want to change the base?
Conversation
updated the setup and build script so this gets past CI. |
Hopefully setup should now work, it also now uploads the build result as a artifact on actions. So can download and see how it turned out. |
5d04456
to
b354952
Compare
changed to only retain artifact for 5 days. |
its not on the LUA wiki page after build... common-lua-scripts.html...., where should I look? |
d400b2b
to
7cdf587
Compare
added missing python package. |
Updated the templates to better fit our wiki style. Split out into new page for API docs. Currently this includes the existing manual docs because there better than the auto generated ones. The plan in the future would be to migrate those across and for the new page to be completely auto generated. The auto generation is still missing things like class and method descriptions that are present in |
does not work on my local build of this PR....ran sphinxsetup.sh then try to build wiki...get this error: |
|
||
The API documentation described here is not a complete list, but rather some examples. For a **full list of the methods** currently available, the LUA auto-generated document file is a complete list, It can be found `here <https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_Scripting/docs/docs.lua>`__ and lists all the available bindings and their parameters. | ||
|
||
See :ref:`API Docs Syntax<common-lua-API>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this points to itself???
|
||
Getting Started | ||
=============== | ||
--------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you changing these?
@IamPete1 lets chat on this when you have a chance...been a while...shall we close...dont think we can get the format pretty, right? |
We could get the format better, just is a weird template method I was having a hard time with. |
This adds a new submodule: https://github.com/boolangery/sphinx-lua I have then done a patch on top of that to get what we need.
This then adds two new extensions and uses them to auto generate a nearly ( just missing global methods ) complete set of documentation based on that added to AP recently.
Takes a little messing, will need to install https://github.com/boolangery/py-lua-doc and install the new submodule from its
setup.py
Formatting is not fantastic, but we can improve that, this is more just a proof that we can grab the docs from the AP repo and generate the wiki.
I have left in the existing API documentation, since this is not fantastically useful until we flesh it out a little more with descriptions and such.
This is what the page ends up looking like:
Lua Scripts — Copter documentation.pdf
For example:

One of the classes that has good documentation:
