-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Telemetry: track Sphinx extensions
and html_theme
variables
#9639
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
Conversation
Pretty simple implementation to track Sphinx's extensions and theme. This is not the best implementation, but I think it could be good as a first start. The new `doctool` key added will have this shape: ``` "doctool": { "extensions": [ "readthedocs_ext.readthedocs", "notfound.extension", "autoapi.extension", "sphinx_tabs.tabs", "sphinx-prompt", "sphinxemoji.sphinxemoji" ], "name": "sphinx", "theme": "sphinx_rtd_theme" }, ``` Closes #9627
Our extension is now dumping the data we want to consume here. So, we are just reading that file and saving it as part of the `BuildData` object.
This is how it looks the output now that we are using
|
It requires this diff to test it locally: diff --git a/readthedocs/doc_builder/python_environments.py b/readthedocs/doc_builder/python_environments.py
index 1d2a8ffef..0bee30074 100644
--- a/readthedocs/doc_builder/python_environments.py
+++ b/readthedocs/doc_builder/python_environments.py
@@ -215,8 +215,10 @@ class Virtualenv(PythonEnvironment):
),
self.project.get_feature_value(
Feature.USE_SPHINX_RTD_EXT_LATEST,
- positive='readthedocs-sphinx-ext',
- negative='readthedocs-sphinx-ext<2.2',
+ # positive='readthedocs-sphinx-ext',
+ # negative='readthedocs-sphinx-ext<2.2',
+ positive='git+https://github.com/readthedocs/readthedocs-sphinx-ext@humitos/telemetry-extensions-theme#egg=readthedocs-sphinx-ext',
+ negative='git+https://github.com/readthedocs/readthedocs-sphinx-ext@humitos/telemetry-extensions-theme#egg=readthedocs-sphinx-ext',
),
])
if not self.project.has_feature(Feature.USE_SPHINX_LATEST): |
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.
I dislike adding more features to our extension, but I do feel like the Sphinx run is the right place to gather this data.
Yeah. Also, this approach will only works while we have control over the builds and automatically install our extension. We could think about a different of doing this in the future, but I think it's fine for now. |
Pretty simple implementation to track Sphinx's extensions and theme. This is not the best implementation, but I think it could be good as a first start.
The new
doctool
key added will have this shape:Closes #9627
Requires: readthedocs/readthedocs-sphinx-ext#117
📚 Documentation previews 📚
docs
): https://docs--9639.org.readthedocs.build/en/9639/dev
): https://dev--9639.org.readthedocs.build/en/9639/