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 PyMaterialXGen*. #2041

Conversation

StefanHabel
Copy link
Contributor

@StefanHabel StefanHabel commented 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 #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 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 28 38 Screenshot 2024-09-30 at 11 32 11
Screenshot 2024-09-30 at 11 29 58 Screenshot 2024-09-30 at 11 32 18
Screenshot 2024-09-30 at 11 30 05 Screenshot 2024-09-30 at 11 32 26
Screenshot 2024-09-30 at 11 30 13 Screenshot 2024-09-30 at 11 32 33
Screenshot 2024-09-30 at 11 30 20 Screenshot 2024-09-30 at 11 32 38

Split from #1567.

Depends on #2038.

Update #342.

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 <[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