Skip to content

Add sphinx docs#12

Merged
c24t merged 27 commits intoopen-telemetry:masterfrom
c24t:sphinx-docs
Jun 21, 2019
Merged

Add sphinx docs#12
c24t merged 27 commits intoopen-telemetry:masterfrom
c24t:sphinx-docs

Conversation

@c24t
Copy link
Copy Markdown
Member

@c24t c24t commented Jun 4, 2019

This PR adds sphinx boilerplate for generating API docs. Most files are generated with sphinx-quickstart and sphinx-apidoc with few changes.

This branch builds on #11, I'll rebase as it's updated.

You can build the html docs from this branch as:

pip install sphinx sphinx_autodoc_typehints sphinx_rtd_theme
sphinx-quickstart
sphinx-apidoc --force -e -o docs opentelemetry
(cd docs; make html)

I also pushed the generated html docs to the sphinx-docs-built branch, which you can check out to view the docs without building them yourself.

@c24t c24t added the meta Related to repo itself, process, community, ... label Jun 4, 2019
Copy link
Copy Markdown
Member

@Oberon00 Oberon00 left a comment

Choose a reason for hiding this comment

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

Apart from the comment LGTM, but of course this can only be merged once the dependent #11 is merged.

---------------

.. automodule:: opentelemetry.api
:members:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since these options seem to be the same everywhere, they should be added to the configuration https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options

@c24t
Copy link
Copy Markdown
Member Author

c24t commented Jun 20, 2019

Should we (1) document the constructor args in the class docstring as opencensus does or (2) whitelist __init__ and keep the docs there?

Option 1:

Screen Shot 2019-06-20 at 11 54 07 AM

and option 2:

Screen Shot 2019-06-20 at 11 54 42 AM

I have a slight preference for option 1, but option 2 is more explicit.

@c24t
Copy link
Copy Markdown
Member Author

c24t commented Jun 20, 2019

I updated the sphinx-docs-built branch, see the generated html docs there.

@c24t c24t requested a review from carlosalberto as a code owner June 21, 2019 19:25
@c24t
Copy link
Copy Markdown
Member Author

c24t commented Jun 21, 2019

I update the docs for the package move in #21 and removed a lot of the generated API doc boilerplate. After the package move autodoc generates empty docs for the new empty packages from #19, I removed these by hand.

I also moved the opentelemetry.trace module docs up to the top-level TOC with the expectation that we'll curate the TOC ourselves instead of leaving it up to autodoc. These changes mean we can't just run sphinx-apidoc and make html to generate the docs; we have to prune some generated files by hand.

Screen Shot 2019-06-21 at 12 27 05 PM

Screen Shot 2019-06-21 at 12 27 17 PM

@c24t c24t merged commit e7b5279 into open-telemetry:master Jun 21, 2019
AbhiPrasad added a commit to AbhiPrasad/opentelemetry-python that referenced this pull request Mar 30, 2026
Carry the final autoresearch tree as one reviewable change that includes the trace benchmark harness, SDK trace hot-path reductions, empty-context activation fast path, direct BoundedAttributes initialization, and focused validation updates.

Experiments: open-telemetry#4, open-telemetry#5, open-telemetry#6, open-telemetry#7, open-telemetry#8, open-telemetry#9, open-telemetry#10, open-telemetry#11, open-telemetry#12, open-telemetry#14, open-telemetry#15, open-telemetry#16, open-telemetry#17, open-telemetry#18, open-telemetry#19
Metric: combined_mean_us 44.469470µs → 22.762846µs (-48.8%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to repo itself, process, community, ...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants