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 a docstring for PyMaterialXFormat. #2040

Conversation

StefanHabel
Copy link
Contributor

@StefanHabel StefanHabel commented 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 #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.

Before After
Screenshot 2024-09-30 at 11 16 34 Screenshot 2024-09-30 at 11 19 47

Split from #1567.

Depends on #2038.

Update #342.

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