-
Notifications
You must be signed in to change notification settings - Fork 2
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
CMake Module for Generating PluginPlay Module Docs #206
Conversation
I'll take a crack at getting this up and running. For Task 2, my initial thought is that it is possible to point Sphinx at the generated files, especially since the generated documentation is already in rst format. You should just be able to add it to a TOC in an index file somewhere. Sphinx will generate HTML to display the documentation if it exists or a blank page (or 404 error, probably) if the files don't. However, we'll need to make sure that these documentation files is generated before Sphinx is run. |
If I'm understanding you correctly you're thinking:
While that should work, putting generated files in the documentation source is frowned upon (you're supposed to keep the source pristine). That said, I just looked at how we build the Doxygen docs and it looks like we do a similar thing (I thought we did everything in the build dir for that, but it looks like we actually move the resulting HTML to the documentation source directory so Sphinx can link it in). I guess it's fine for now. |
In that case, I think we can generate the RST files somewhere else, run Sphinx on it separately, and put the built HTML in the build directory of the main documentation. It is a minor deviation from what we do now, but it shouldn't be too bad. It may require a bit more thought after the holidays, but I think we could just give Sphinx the build and source directories as command line arguments to set this up. I'm not sure how the Doxygen is set up, but maybe I can fix that quickly as well. |
@ryanmrichard When I uncommented the remove_all/create_directory lines and tried using the |
I was working on it in GhostFragment. If it works for SCF that's fine. I probably messed something up on my end then. |
I wanted to note that this is still in progress. It has been 95% of the way there for a long time now, but build issues keep preventing me from doing the final round of testing and doc formatting fixes needed. I think I have NWX building again, so I will try to have this done in the next couple weeks. |
Is this good to close? #253 completes most of this and the last task has its own issue to work from. |
This PR starts some CMake infrastructure for making it easy to generate module documentation as part of CI. I'm probably not going to have time to return to this for a bit, but @zachcran if you have some spare cycles this should be pretty easy for you as it's just an extension of the documentation infrastructure you put in place previously.
The planned API will look something like:
I'm not thrilled with putting generated files in the version-controlled documentation source (see the second TODO). Long term, when PluginPlay is installable, I'd like
find_package(pluginplay)
to make theplugin_play_generate_module_docs*
functions available rather than the user having toinclude(make_module_docs)
.TODO
remove_all/create_directory
lines uncommented I erased the executable...docs/source/index.rst
we include a hyperlink to where we will put the resulting HTML).