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

Add Python documentation generation #1218

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

parker-research
Copy link
Contributor

Here's my first go at Python documentation generation.

Things to check with it:

  1. Is it working generating the docs in the correct location to be included in the artifact? I think it might not be.
  2. Should it be merged with the docs/CMakeLists.txt file? Should it go in a different CMake file? Should it be done exclusively in a GH Action (as it is now)? I don't know which direction you want to take with it, and am too novice at CMake to decide/implement.
  3. If it is merged with CMake, using a virtual environment may be a bit tricky, but would be important.

parker-research and others added 6 commits January 20, 2025 12:37
Error:
ERROR:root:Class pyslang.BreakStatement.EvalResult
previously found in pyslang.BlockStatement.EvalResult,
only one occurrence will be chosen. Ensure each class
is exposed only in a single module for generating
correct documentation.
@MikePopoloski
Copy link
Owner

Yeah, I think it should be merged into the CMakeLists so that it can reuse the mcss checkout we already have, and also make sure the outputs end up in the right place. You should be able to navigate to the output website locally and see that it's all working correctly. Also we'll need an actual link to the Python docs from the main website page somewhere.

CMake can run arbitrary commands; the syntax is ugly but otherwise it's not too bad.

@@ -27,7 +27,7 @@ void registerStatements(py::module_& m) {
return fmt::format("Statement(StatementKind.{})", toString(self.kind));
});

py::enum_<Statement::EvalResult>(stmt, "EvalResult")
py::enum_<Statement::EvalResult>(m, "EvalResult")
Copy link
Owner

Choose a reason for hiding this comment

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

Why did this change?

@@ -37,7 +37,8 @@ set(DOXYGEN_TAGFILES
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
set(SCRIPTS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../scripts)
set(DOXYGENPY_PATH "${mcss_SOURCE_DIR}/documentation/doxygen.py")
set(MCSS_DOXYGENPY_PATH "${mcss_SOURCE_DIR}/documentation/doxygen.py")
Copy link
Owner

Choose a reason for hiding this comment

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

Why did this change?

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.

2 participants