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

Adding docstrings for PyMaterialXRender*. #2042

Conversation

StefanHabel
Copy link
Contributor

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 #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.

Before After
Screenshot 2024-09-30 at 11 44 41 Screenshot 2024-09-30 at 11 46 53
Screenshot 2024-09-30 at 11 44 50 Screenshot 2024-09-30 at 11 47 00
Screenshot 2024-09-30 at 11 44 57 Screenshot 2024-09-30 at 11 47 07
Screenshot 2024-09-30 at 11 45 05 Screenshot 2024-09-30 at 11 47 16

Split from #1567.

Depends on #2038.

Update #342.

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 <[email protected]>
@StefanHabel
Copy link
Contributor Author

Abandoning this PR, following discussion in #2039

@StefanHabel StefanHabel closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants