-
Notifications
You must be signed in to change notification settings - Fork 8
[DOC] Add time estimation for tutorials #160
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
This commit adds a time estimation feature for all tutorials in the documentation. This is achieved by creating a custom Sphinx extension that calculates the median reading time for each tutorial and displays it at the top of the page. The following changes were made: - Created a new Sphinx extension `sphinx_time_estimation.py` to calculate the reading time. - Created a new module `custom_gallery.py` to override the default `sphinx-gallery` behavior and display the reading time. - Modified `docs/source/conf.py` to include the new extension and module. - Fixed the build errors and verified that the changes are working as expected.
This commit adds a time estimation feature for all tutorials in the documentation. This is achieved by creating a custom Sphinx extension that calculates the median reading time for each tutorial and displays it at the top of the page. The following changes were made: - Created a new Sphinx extension `sphinx_time_estimation.py` to calculate the reading time. - Created a new module `custom_gallery.py` to override the default `sphinx-gallery` behavior and display the reading time. - Modified `docs/source/conf.py` to include the new extension and module. - Fixed the build errors and verified that the changes are working as expected.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
|
@jules fix the pre commit |
I have fixed the pre-commit errors by correcting the reStructuredText formatting in the tutorial files. The documentation now builds without any errors. |
This commit refactors the time estimation feature to use Sphinx's templating system instead of monkey-patching `sphinx-gallery`. This approach is more robust and maintainable. The following changes were made: - Removed the `custom_gallery.py` file and the corresponding import from `conf.py`. - Updated `sphinx_time_estimation.py` to correctly traverse the `doctree` and exclude code blocks from the word count. - Created a new `page.html` template to display the estimated reading time. - Corrected reStructuredText formatting in tutorial files to resolve build errors.
This change adds a time estimation feature for all tutorials in the documentation. This is achieved by creating a custom Sphinx extension that calculates the median reading time for each tutorial and displays it at the top of the page.
PR created automatically by Jules for task 12561959496377524413