Skip to content
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

Sphinx Python Documentation #1567

Conversation

StefanHabel
Copy link
Contributor

@StefanHabel StefanHabel commented Oct 13, 2023

Work in progress.

This PR adds a new build target named MaterialXDocsPython, which generates Python API documentation using Sphinx.

The existing developer guide contents are incorporated into the new HTML documentation, which lives side-by-side to the existing Doxygen-generated C++ API documentation.

Docstrings were added to all modules, functions, classes, methods, and attributes.

All parameters were named. None should appear as arg0, arg1, arg2 etc anymore.

Statistics about the Python API have been added to the Sphinx build process.

The Sphinx build output currently ends with the following messages, providing an overview of the state of the API docs:

The MaterialX Python API consists of:
    * 11 modules
    * 48 functions
    * 139 classes
    * 1180 methods
    * 6 exception types

build succeeded.

Docstring example:

$ python3 -c 'import PyMaterialXFormat; help(PyMaterialXFormat.flattenFilenames)'
Help on built-in function flattenFilenames in module PyMaterialXFormat:

flattenFilenames(...) method of builtins.PyCapsule instance
    flattenFilenames(doc: PyMaterialXCore.Document, searchPath: PyMaterialXFormat.FileSearchPath = mx.FileSearchPath(), customResolver: PyMaterialXCore.StringResolver = None) -> None

    Flatten all filenames in the given document, applying string resolvers at
    the scope of each element and removing all fileprefix attributes.

    :param doc: The document to modify.
    :type doc: Document
    :param searchPath: An optional search path for relative to absolute path
        conversion.
    :type searchPath: FileSearchPath
    :param customResolver: An optional custom resolver to apply.
    :type customResolver: StringResolver

Preview of generated HTML pages:

Screenshot 2023-10-21 at 14 14 41
Screenshot 2023-10-21 at 14 28 03

Development environment:

  • Apple clang version 15.0.0 (clang-1500.0.40.1)
  • Python 3.12.0 (v3.12.0:0fb18b02c8, Oct 2 2023, 09:45:56) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
  • Sphinx 7.2.6
  • cmake version 3.27.6

Update #342

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 13, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@StefanHabel StefanHabel marked this pull request as draft October 13, 2023 01:46
Copy link
Contributor

@kwokcb kwokcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great addition to have !
I left some minor niggly comments. The only real question I had is any inter-dependence on building the actual Python modules.
Thanks.

documents/DeveloperGuide/ShaderGeneration.md Outdated Show resolved Hide resolved
documents/DeveloperGuide/index.rst Outdated Show resolved Hide resolved
documents/sphinx-custom.css Show resolved Hide resolved
documents/CMakeLists.txt Show resolved Hide resolved
### Example Images
## Example Images

![MaterialX Graph Editor with procedural marble example](../Images/MaterialXGraphEditor_Marble.png)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not specific to this PR but I noticed that images don't show up properly on the PyPi package page for MaterialX.
If were adding more images, just curious is there a more robust way to specify image references -- such as an absolute reference to the web site location instead of using relative paths ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see the issue: https://pypi.org/project/materialx/

It's great to see that the documentation content is reused in many places!

I've migrated the Markdown docs, including README.md, to use absolute paths now:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update of these markdown files has been split off into its own PR: #2037

@jstone-lucasfilm jstone-lucasfilm changed the title Update #342 Sphinx Python Documentation. Sphinx Python Documentation Oct 13, 2023
@StefanHabel StefanHabel force-pushed the #342-Sphinx-Python-Documentation branch from 8a66335 to 9e4c1ff Compare October 16, 2023 04:54
Work in progress.

This PR adds a new build target named `MaterialXDocsPython`,
which generates Python API documentation using Sphinx.

The existing developer guide contents are incorporated into
the new HTML documentation, which lives side-by-side to the
existing Doxygen-generated C++ API documentation.

The docstrings of the Python modules were tweaked to describe
what the individual modules are responsible for.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
@StefanHabel StefanHabel force-pushed the #342-Sphinx-Python-Documentation branch from 9e4c1ff to bef6e1f Compare October 18, 2023 05:46
…d Markdown files to use absolute URLs.

This is to make sure the URLs can be loaded within GitHub, Doxygen,
Sphinx, and the PyPI project page. Requires internet access.

Also updated XML text snippets to use XML comment delimiters.
…d `index.rst`.

Changed index page title, added introduction text, and changed the
order of Python modules, to reflect the order in which support for the
different shading languages was added to MaterialX.
…ed import order dependency issue.

This patch adds calls of `pybind11::module::import()` to the Python
bindings of modules that depend on specific other modules.

This approach is similar to importing required modules via `import` in
Python packages/modules.

At the same time, we can remove the new documentation for this issue,
and can remove extra steps from the Sphinx `conf.py` configuration file.

With this patch in place, it should be possible to import any of the
MaterialX Python modules in any order.
…d Sphinx configuration.

- Added a new description/about text in the sidebar, including blue
  link buttons to GitHub and MaterialX on Mastodon (with an SVG-based
  embedded icon)
- Applied the "monokai" syntax highlighting theme to code snippets
- Added custom Jinja templates for classes and modules, in order to add
  a section title before the alphabetical indices on pages
- Added a custom HTML template for the navigation section in the sidebar
  in order to limit the depth of the table of contents
- Added code to remove module names from the signatures of functions,
  in order to make the docs more readable
…define to produce detailed error messages in pybind11.
…d aliasing of `PyMaterialXFormat.readFromXmlFile()` function.

The function is now exposed under its real name in the pybind11 bindings
in C++.
Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
either within the `MaterialX` Python package or as a standalone module.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Sep 30, 2024
This PR adds support for generating Python API documentation in HTML format
using Sphinx from the MaterialX Python that are built in the `lib/`
directory.

A new CMake build option named `MATERIALX_BUILD_PYTHON_DOCS` allows
developers to turn generating Python API documentation on.

When `MATERIALX_BUILD_PYTHON_DOCS` is set to `ON`, `MATERIALX_BUILD_PYTHON`
is set to `ON` as well, ensuring we have Python modules for which to build
the Python API docs.

The core functionality of generating Python API documentation lives in a
new directory named `documents/PythonAPI/`. It is controlled with a new
`CMakeLists.txt` file in that directory, which defines a new target named
`MaterialXDocsPython`, similar to the existing target `MaterialXDocs` that
generates API documentation for the MaterialX C++ API.

To facilitate the curation and addition of docstrings in the implementation
files within `source/PyMaterialX/`, this PR adds a new helper macro named
`PYMATERIALX_DOCSTRING` that allows developers of Python modules to define
docstrings using the following pattern:
```cpp
PYMATERIALX_DOCSTRING(R"docstring(
...markdown text here...
)docstring");
```

Revised docstrings for modules and classes are to be added in subsequent PRs
separately.

Documentation in markdown format from the existing `DeveloperGuide` is
integrated into the new Python API documentation by way of symlinking the
four main `.md` files into the `documents/PythonAPI/sources/` directory
from which Sphinx generates the resulting HTML documentation.

Warnings that are issued when generating the documentation via Sphinx are
to be addressed in a separate PR for the markdown files:
AcademySoftwareFoundation#2037

To build the docs from scratch on macOS, I've used the following build
script, naming it `build.sh` in the `MaterialX` checkout directory:
```bash
#!/usr/bin/env tcsh

echo build.sh: Updating Git submodules...
git submodule update --init --recursive

# Create and activate a virtual environment for installing Python dependencies
python3 -m venv /tmp/venv
source /tmp/venv/bin/activate.csh

echo build.sh: Installing dependencies...
python3 -m pip install myst_parser  # https://pypi.org/project/myst-parser/

echo build.sh: Making build directory and changing into it...
mkdir build
cd build

echo build.sh: Configuring...
cmake .. \
    --fresh \
    -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk \
    -DMATERIALX_BUILD_PYTHON=ON \
    -DMATERIALX_BUILD_VIEWER=ON \
    -DMATERIALX_BUILD_GRAPH_EDITOR=ON \
    -DMATERIALX_BUILD_DOCS=ON \
    -DMATERIALX_BUILD_PYTHON_DOCS=ON \
    -DMATERIALX_BUILD_TESTS=ON \
&& \
echo build.sh: Building... \
&& \
cmake --build . -j 8 \
&& \
echo build.sh: Building target MaterialXDocs... \
&& \
cmake --build . --target MaterialXDocs \
&& \
echo build.sh: Building target MaterialXDocsPython... \
&& \
cmake --build . --target MaterialXDocsPython \
&& \
afplay /System/Library/Sounds/Blow.aiff

# Deactivate the virtual environment
deactivate
```
The build output currently ends with the following messages:
```python
The parsed MaterialX Python API consists of:
    * 11 modules
    * 48 functions
    * 139 classes
    * 1175 methods
    * 6 exception types

WARNING: 48 functions look like they do not have docstrings yet.
WARNING: 1019 methods look like they do not have docstrings yet.
WARNING: 32 functions look like their parameters have not all been named using `py::arg()`.
WARNING: 499 methods look like their parameters have not all been named using `py::arg()`.
build succeeded, 168 warnings.

The HTML pages are in ..
[100%] Built target MaterialXDocsPython
```

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Sep 30, 2024
This PR adds a docstring in markdown format to the `PyMaterialXCore` module.

The docstring is defined in a macro named `PyMaterialXCore_DOCSTRING` that
uses the new `PYMATERIALX_DOCSTRING` macro to allow us to place the first
and last lines in lines by themselves, rather than starting the docstring
contents immediately after the `R"docstring(` marker.

The `PyMaterialXCore_DOCSTRING` macro is placed in a separate header file
named `__doc__.md.h` which lives side-by-side with the `PyModule.cpp` file
in which it is included.

Split from AcademySoftwareFoundation#1567.

Depends on AcademySoftwareFoundation#2038.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Sep 30, 2024
This PR adds a docstring in markdown format to the `PyMaterialXFormat` module.

The docstring is defined in a macro named `PyMaterialXFormat_DOCSTRING`
that uses the new `PYMATERIALX_DOCSTRING` macro that is introduced in AcademySoftwareFoundation#2038
to allow us to place the first and last lines in lines by themselves,
rather than starting the docstring contents immediately after the
`R"docstring(` marker.

The `PyMaterialXFormat_DOCSTRING` macro is placed in a separate header file
named `__doc__.md.h` which lives side-by-side with the `PyModule.cpp` file
in which it is included.

Note that the docstrings for individual classes, methods, and functions are
to be added in separate PRs.

Note that this PR also renames `readFromXmlFileBase()` to `readFromXmlFile()`
allowing us to remove the alias from `python/MaterialX/main.py`.

Split from AcademySoftwareFoundation#1567.

Depends on AcademySoftwareFoundation#2038.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Sep 30, 2024
This PR adds docstrings in markdown format to the following modules:
- `PyMaterialXGenGlsl`
- `PyMaterialXGenMdl`
- `PyMaterialXGenMsl`
- `PyMaterialXGenOsl`
- `PyMaterialXGenShader`

The docstrings are defined in macros named `PyMaterialXGen*_DOCSTRING` that
use the new `PYMATERIALX_DOCSTRING` macro that is introduced in AcademySoftwareFoundation#2038 to
allow us to place the first and last lines in lines by themselves, rather
than starting the docstring contents immediately after the `R"docstring(`
marker.

The `PyMaterialXGen*_DOCSTRING` macros are placed in separate header files
named `__doc__.md.h` which live side-by-side with their corresponding
`PyModule.cpp` file in which it is included.

Note that the docstrings for individual classes, methods, and functions are
to be added in separate PRs.

Split from AcademySoftwareFoundation#1567.

Depends on AcademySoftwareFoundation#2038.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Sep 30, 2024
This PR adds docstrings in markdown format to the following modules:
- `PyMaterialXRender`
- `PyMaterialXRenderGlsl`
- `PyMaterialXRenderMsl`
- `PyMaterialXRenderOsl`

The docstrings are defined in macros named `PyMaterialXRender*_DOCSTRING`
that use the new `PYMATERIALX_DOCSTRING` macro that is introduced in AcademySoftwareFoundation#2038
to allow us to place the first and last lines in lines by themselves,
rather than starting the docstring contents immediately after the
`R"docstring(` marker.

The `PyMaterialXRender*_DOCSTRING` macros are placed in separate header
files named `__doc__.md.h` which live side-by-side with their corresponding
`PyModule.cpp` files in which they are included.

Note that the docstrings for individual classes, methods, and functions are
to be added in separate PRs.

Split from AcademySoftwareFoundation#1567.

Depends on AcademySoftwareFoundation#2038.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 1, 2024
This PR adds support for generating Python API documentation in HTML format
using Sphinx from the MaterialX Python that are built in the `lib/`
directory.

A new CMake build option named `MATERIALX_BUILD_PYTHON_DOCS` allows
developers to turn generating Python API documentation on.

When `MATERIALX_BUILD_PYTHON_DOCS` is set to `ON`, `MATERIALX_BUILD_PYTHON`
is set to `ON` as well, ensuring we have Python modules for which to build
the Python API docs.

The core functionality of generating Python API documentation lives in a
new directory named `documents/PythonAPI/`. It is controlled with a new
`CMakeLists.txt` file in that directory, which defines a new target named
`MaterialXDocsPython`, similar to the existing target `MaterialXDocs` that
generates API documentation for the MaterialX C++ API.

To facilitate the curation and addition of docstrings in the implementation
files within `source/PyMaterialX/`, this PR adds a new helper macro named
`PYMATERIALX_DOCSTRING` that allows developers of Python modules to define
docstrings using the following pattern:
```cpp
PYMATERIALX_DOCSTRING(R"docstring(
...markdown text here...
)docstring");
```

Revised docstrings for modules and classes are to be added in subsequent PRs
separately.

Documentation in markdown format from the existing `DeveloperGuide` is
integrated into the new Python API documentation by way of symlinking the
four main `.md` files into the `documents/PythonAPI/sources/` directory
from which Sphinx generates the resulting HTML documentation.

Warnings that are issued when generating the documentation via Sphinx are
to be addressed in a separate PR for the markdown files:
AcademySoftwareFoundation#2037

To build the docs from scratch on macOS, I've used the following build
script, naming it `build.sh` in the `MaterialX` checkout directory:
```bash

echo build.sh: Updating Git submodules...
git submodule update --init --recursive

python3 -m venv /tmp/venv
source /tmp/venv/bin/activate.csh

echo build.sh: Installing dependencies...
python3 -m pip install myst_parser  # https://pypi.org/project/myst-parser/

echo build.sh: Making build directory and changing into it...
mkdir build
cd build

echo build.sh: Configuring...
cmake .. \
    --fresh \
    -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk \
    -DMATERIALX_BUILD_PYTHON=ON \
    -DMATERIALX_BUILD_VIEWER=ON \
    -DMATERIALX_BUILD_GRAPH_EDITOR=ON \
    -DMATERIALX_BUILD_DOCS=ON \
    -DMATERIALX_BUILD_PYTHON_DOCS=ON \
    -DMATERIALX_BUILD_TESTS=ON \
&& \
echo build.sh: Building... \
&& \
cmake --build . -j 8 \
&& \
echo build.sh: Building target MaterialXDocs... \
&& \
cmake --build . --target MaterialXDocs \
&& \
echo build.sh: Building target MaterialXDocsPython... \
&& \
cmake --build . --target MaterialXDocsPython \
&& \
afplay /System/Library/Sounds/Blow.aiff

deactivate
```
The build output currently ends with the following messages:
```python
The parsed MaterialX Python API consists of:
    * 11 modules
    * 48 functions
    * 139 classes
    * 1175 methods
    * 6 exception types

WARNING: 48 functions look like they do not have docstrings yet.
WARNING: 1019 methods look like they do not have docstrings yet.
WARNING: 32 functions look like their parameters have not all been named using `py::arg()`.
WARNING: 499 methods look like their parameters have not all been named using `py::arg()`.
build succeeded, 168 warnings.

The HTML pages are in ..
[100%] Built target MaterialXDocsPython
```

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 3, 2024
This PR adds a docstring in markdown format to the `PyMaterialXCore` module.

The docstring is defined in a macro named `PyMaterialXCore_DOCSTRING` that
uses the new `PYMATERIALX_DOCSTRING` macro to allow us to place the first
and last lines in lines by themselves, rather than starting the docstring
contents immediately after the `R"docstring(` marker.

The `PyMaterialXCore_DOCSTRING` macro is placed in a separate header file
named `__doc__.md.h` which lives side-by-side with the `PyModule.cpp` file
in which it is included.

Split from AcademySoftwareFoundation#1567.

Depends on AcademySoftwareFoundation#2038.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 3, 2024
This PR adds support for generating Python API documentation in HTML format
using Sphinx from the MaterialX Python that are built in the `lib/`
directory.

A new CMake build option named `MATERIALX_BUILD_PYTHON_DOCS` allows
developers to turn generating Python API documentation on.

When `MATERIALX_BUILD_PYTHON_DOCS` is set to `ON`, `MATERIALX_BUILD_PYTHON`
is set to `ON` as well, ensuring we have Python modules for which to build
the Python API docs.

The core functionality of generating Python API documentation lives in a
new directory named `documents/PythonAPI/`. It is controlled with a new
`CMakeLists.txt` file in that directory, which defines a new target named
`MaterialXDocsPython`, similar to the existing target `MaterialXDocs` that
generates API documentation for the MaterialX C++ API.

To facilitate the curation and addition of docstrings in the implementation
files within `source/PyMaterialX/`, this PR adds a new helper macro named
`PYMATERIALX_DOCSTRING` that allows developers of Python modules to define
docstrings using the following pattern:
```cpp
PYMATERIALX_DOCSTRING(R"docstring(
...markdown text here...
)docstring");
```

Revised docstrings for modules and classes are to be added in subsequent PRs
separately.

Documentation in markdown format from the existing `DeveloperGuide` is
integrated into the new Python API documentation by way of symlinking the
four main `.md` files into the `documents/PythonAPI/sources/` directory
from which Sphinx generates the resulting HTML documentation.

Warnings that are issued when generating the documentation via Sphinx are
to be addressed in a separate PR for the markdown files:
AcademySoftwareFoundation#2037

To build the docs from scratch on macOS, I've used the following build
script, naming it `build.sh` in the `MaterialX` checkout directory:
```bash

echo build.sh: Updating Git submodules...
git submodule update --init --recursive

python3 -m venv /tmp/venv
source /tmp/venv/bin/activate.csh

echo build.sh: Installing dependencies...
python3 -m pip install myst_parser  # https://pypi.org/project/myst-parser/

echo build.sh: Making build directory and changing into it...
mkdir build
cd build

echo build.sh: Configuring...
cmake .. \
    --fresh \
    -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk \
    -DMATERIALX_BUILD_PYTHON=ON \
    -DMATERIALX_BUILD_VIEWER=ON \
    -DMATERIALX_BUILD_GRAPH_EDITOR=ON \
    -DMATERIALX_BUILD_DOCS=ON \
    -DMATERIALX_BUILD_PYTHON_DOCS=ON \
    -DMATERIALX_BUILD_TESTS=ON \
&& \
echo build.sh: Building... \
&& \
cmake --build . -j 8 \
&& \
echo build.sh: Building target MaterialXDocs... \
&& \
cmake --build . --target MaterialXDocs \
&& \
echo build.sh: Building target MaterialXDocsPython... \
&& \
cmake --build . --target MaterialXDocsPython \
&& \
afplay /System/Library/Sounds/Blow.aiff

deactivate
```
The build output currently ends with the following messages:
```python
The parsed MaterialX Python API consists of:
    * 11 modules
    * 48 functions
    * 139 classes
    * 1175 methods
    * 6 exception types

WARNING: 48 functions look like they do not have docstrings yet.
WARNING: 1019 methods look like they do not have docstrings yet.
WARNING: 32 functions look like their parameters have not all been named using `py::arg()`.
WARNING: 499 methods look like their parameters have not all been named using `py::arg()`.
build succeeded, 168 warnings.

The HTML pages are in ..
[100%] Built target MaterialXDocsPython
```

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
@jstone-lucasfilm
Copy link
Member

Thanks for getting this started, @StefanHabel, and I believe we can close out this earlier PR in favor of your recent work in #2038.

StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 7, 2024
Mostly copied from corresponding C++ header files, but using backticks to
automatically link to relevant sections in the Python API documentation,
e.g. `Document` to link to `PyMaterialXCore.Document.html`.

Using `mod.attr("<name>").doc() = ...` syntax so that this patch only adds
new lines, rather than modifying existing lines.

Using `:see:` fields to link to the corresponding C++ API docs page.

Demo of generated HTML page available here:
https://stefanhabel.github.io/generated/PyMaterialXCore.html

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 8, 2024
Mostly copied from corresponding C++ header files, but using backticks to
automatically link to relevant sections in the Python API documentation,
e.g. `Document` to link to `PyMaterialXCore.Document.html`.

Using `mod.attr("<name>").doc() = ...` syntax so that this patch only adds
new lines, rather than modifying existing lines.

Using `:see:` fields to link to the corresponding C++ API docs page.

Demo of generated HTML page available here:
https://stefanhabel.github.io/generated/PyMaterialXCore.html

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 13, 2024
Mostly copied from corresponding C++ header files, but using backticks to
automatically link to relevant sections in the Python API documentation,
e.g. `Document` to link to `PyMaterialXCore.Document.html`.

Using `mod.attr("<name>").doc() = ...` syntax so that this patch only adds
new lines, rather than modifying existing lines.

Using `:see:` fields to link to the corresponding C++ API docs page.

Demo of generated HTML page available here:
https://stefanhabel.github.io/generated/PyMaterialXCore.html

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 13, 2024
Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 13, 2024
Similar to AcademySoftwareFoundation#2051 and AcademySoftwareFoundation#2061.

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 13, 2024
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 13, 2024
StefanHabel added a commit to StefanHabel/MaterialX that referenced this pull request Oct 14, 2024
Similar to AcademySoftwareFoundation#2051, AcademySoftwareFoundation#2061, AcademySoftwareFoundation#2063, AcademySoftwareFoundation#2064, and AcademySoftwareFoundation#2065.

Also fixing a couple of typos in Metal header files.

Split from AcademySoftwareFoundation#1567.

Update AcademySoftwareFoundation#342.

Signed-off-by: Stefan Habel <19556655+StefanHabel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants