Open jstone-lucasfilm opened 4 years ago
I'd like to take a stab at this for the ASWF Dev Days 2023.
If I’m understanding this right, the work here roughly consists of two parts:
While it may not be possible/feasible to add/curate docstrings for all MaterialX Python bindings during Dev Days, it should be possible to lay the foundation for building API documentation using Sphinx on the day.
Proposed approach/outcome:
cmake --build . --target MaterialXDocs
(which uses doxygen
to generate C++ API documentation), possibly named MaterialXDocsPython
.html
folder).Proposed artifacts:
cmake/modules/FindSphinx.cmake
to be able to find the sphinx-build
executable (Windows: sphinx-build.exe
) from documents/CMakeLists.txt
using find_package(Sphinx)
.
documents/CMakeLists.txt
to create a new build target named MaterialXDocsPython
, which would run sphinx-build
to generate Python API developer documentation, in a directory that is separate to the existing doxygen
-generated html
documentation, e.g. named html-sphinx
.
documents/sphinx-conf.py.in
) that would be filled with values of configuration variables like MATERIALX_LIBRARY_VERSION
as part of the build, in order to generate the conf.py
file that sphinx-build
uses.
developer/Doxyfile.in
from which documents/CMakeLists.txt
generates Doxyfile
for configuring the doxygen
run.documents/DeveloperGuide/
into the Sphinx-generated Python API documentation, e.g. using the myst_parser
extension:
documents/DeveloperGuide/MainPage.md
to describe how to build the Python API documentation using Sphinx.source/PyMaterialX/
from compiled Python C extensions, e.g. from lib/PyMaterialXCore.cpython-312-darwin.so
etc.
I'd like to continue our work on this from last year’s ASWF Dev Days next week: https://github.com/AcademySoftwareFoundation/MaterialX/pull/1567
Add support for the generation of Sphinx documentation for MaterialX Python, using the approach described here:
https://pybind11.readthedocs.io/en/stable/advanced/misc.html#generating-documentation-using-sphinx