ynput / ayon-python-api

Apache License 2.0
8 stars 3 forks source link

Add sphinx documentation #125

Closed antirotor closed 6 months ago

antirotor commented 6 months ago

This is an effort to add at least auto-generated API documentation using Sphinx. This PR is:

Testing

1) First install all dependencies: poetry install 2) Run apidoc:

cd ./docs/
poetry run sphinx-apidoc -f -o ../docs/source/ ../ ../tests ../*setup*

3) Generate html:

poetry run sphinx-build -M html .\source .\build

or use provided batch scripts:

check_docstrings.bat - will run pydocstyle against the sources to print out any issues make_api.bat - will run apidocs make_html.bat - will build html documentation.

Result can be found in ./docs/build/html - just open index.html in a browser.

[!NOTE] Some .rst files should be tweaked, some docstring syntax should be checked (build is producing a lot of errors)