-
Notifications
You must be signed in to change notification settings - Fork 423
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 support for sphinx as a documentation generator #595
Conversation
Codecov Report
@@ Coverage Diff @@
## main #595 +/- ##
=======================================
Coverage 94.34% 94.34%
=======================================
Files 189 189
Lines 8949 8949
=======================================
Hits 8443 8443
Misses 506 506 |
api/docs/conf.py
Outdated
author = 'OpenTelemetry authors' | ||
|
||
# The full version, including alpha/beta/rc tags | ||
release = '0.1.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this to 0.2.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I fixed it.
@@ -0,0 +1,2 @@ | |||
breathe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add sphinx-build
too in install dependencies, or the plugins installation will take care of it automatically ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this. LGTM. Sphinx looks really cool - much better docs from doxygen genear html. Couple of things:
-
Hopefully it should be possible to extend this documentation further to include member functions as part of class documentation. Ex, to add member functions for
Tracer
class: https://opentelemetry-c-api.readthedocs.io/en/latest/otel_api/classopentelemetry_1_1trace_1_1Span.html#exhale-class-classopentelemetry-1-1trace-1-1Span -
As part of release process, do we need to invoke some webhook to let
readthedocs
know about the new changes, so that it can regenerate the doc. In case this is not planned as part ofreadthedocs
setup, we can have a github issue? I do plan to work on github action for new releases, and can take care of this.
This should already be there. I'll check why it doesn't show up. |
The readthedocs build automatically kicks off when we push to registered branches. Branches are registered on the readthedocs site, all the documentation building happens in an environment provided by readthedocs, so we do not need a GitHub action on our side. What we would need to do on our side: for every new release we will need to register the release/branch on readthedocs. I assume we will have |
This PR adds support for sphinx as a documentation generator. sphinx was chosen as it is the framework of choice to publish documentation to https://readthedocs.org.
Under the hood it still uses doxygen to create reStructuredText files, which are then used by sphinx. So we don't need to change anything with our existing practices for API documentation.
Currently this includes a root project in
docs/public
, which can link specific subprojects. Currently the only subproject linked is the API documentation inapi/docs
.This is how it looks on readthedocs: https://opentelemetry-c-api.readthedocs.io/en/latest/
When this PR is approved, I will set up a readthedocs project based on this repository, the above is just a placeholder to show how the final result will look like.