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

Introduce the infrastructure for auto-generating API documentation via sphinx and doxygen #383

Merged
merged 25 commits into from
Jan 19, 2024

Conversation

tmadlener
Copy link
Collaborator

@tmadlener tmadlener commented Feb 28, 2023

BEGINRELEASENOTES

  • Switch to sphinx for generating documentation
    • Keep doxygen for generating the c++ files and then use breathe to integrate that into the sphinx generated documentation
  • Add python bindings auto documentation generation via sphinx
  • Fixes API docs for podio, including python bindings #350

ENDRELEASENOTES

This is currently using the read the docs sphinx theme, but we can in principle switch to anything else. The Sphinx target is not built automatically even if CREATE_DOC is enabled.

This introduces the basic infrastructure to run doxygen as well as autodoc within sphinx to generate API documentation from docstrings automatically. It furthermore also produces the other documentation from the markdown files in doc. I think actually fixing the content of the documentation can go to subsequent PRs, where we can also address smaller style changes.

Additionally, this PR also does not solve the question on where to host the versioned documentation. For now this will just push the things to the gh-pages branch, which will automatically publish it on github pages.

@tmadlener tmadlener force-pushed the generate-doc branch 3 times, most recently from 3e5f677 to 2f14fea Compare December 18, 2023 09:23
@tmadlener tmadlener changed the title [wip] Use sphinx and doxygen to generate more comprehensive (API) documentation Use sphinx and doxygen to generate more comprehensive (API) documentation Dec 18, 2023
@tmadlener tmadlener changed the title Use sphinx and doxygen to generate more comprehensive (API) documentation Introduce the infrastructure for auto-generating API documentation via sphinx and doxygen Dec 18, 2023
@tmadlener
Copy link
Collaborator Author

This currently includes configuration for publishing via readthedocs. Since, readthedocs builds in a slightly different environment then we usually do this will currently not work for the generation of the python API docs. There are a few things that can be done to work around that though.

@tmadlener
Copy link
Collaborator Author

tmadlener commented Dec 21, 2023

Removed the readthedocs configuration again and instead went for an attempt that uses sphinx-multiversion + some functionality in the github actions workflow.

The current result can be seen here at https://tmadlener.github.io/podio

What this does not yet do and where I think we might actually need some dedicated scripting:

  • Also automatically generate the c++ and python api documentation for all tags. This seems to currently only work for the current tag / branch

Another slight disadvantage of sphinx-multiversion is that it always regenerates all versions, whereas we would probably be fine with having things only regenerate the current version.

We could also think about splitting the automatic (re-)generatiaon and (re-)deploying to wherever we choose to host this in the end into a separate PR to at least have something that allows users to generate readable documentation locally.

.github/workflows/docs.yml Outdated Show resolved Hide resolved
@tmadlener
Copy link
Collaborator Author

I have removed the sphinx-multiversion support again as it will not work as intended. With this, this PR actually removes all "fancy" functionality like versioned documentation. For now it just allows to generate documentation locally, and also publishing the latest master version to github pages.

@tmadlener tmadlener force-pushed the generate-doc branch 2 times, most recently from 7abfc83 to daf1a33 Compare January 18, 2024 10:35
doc/conf.py Outdated Show resolved Hide resolved
doc/conf.py Outdated Show resolved Hide resolved
@tmadlener tmadlener merged commit a1e14d5 into AIDASoft:master Jan 19, 2024
18 checks passed
@tmadlener tmadlener deleted the generate-doc branch January 19, 2024 13:05
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.

API docs for podio, including python bindings
1 participant