Skip to content

Conversation

@tdavidcl
Copy link
Member

@tdavidcl tdavidcl commented Dec 6, 2025

Work for the generation, but the toc tree is messed up on the left. We need a way to fix that

@gemini-code-assist
Copy link

Summary of Changes

Hello @tdavidcl, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the organization of the project's documentation by introducing a custom preprocessing step for the Sphinx Gallery. It addresses the limitation of Sphinx Gallery's inability to handle deeply nested example directories, allowing for a more structured and intuitive presentation of examples. The change involves both a logical restructuring of example files into new subdirectories and a dynamic script that flattens these hierarchies for the documentation build process, ultimately improving navigability and clarity for users exploring the examples.

Highlights

  • Sphinx Gallery Subsections: Implemented a programmatic workaround in conf.py to enable nested subsections within the Sphinx Gallery, which does not natively support more than one level of nesting. This is achieved by flattening the directory structure during documentation generation.
  • Example Directory Restructuring: Restructured existing example files into new, logically grouped subdirectories, specifically creating math/sph and production_runs to better organize the documentation examples.
  • Dynamic Directory Management: Added a preprocessing script to conf.py that dynamically copies the example directory, identifies nested gallery folders, and renames them by contracting the path with underscores (e.g., math/sph becomes math_sph) before Sphinx Gallery processes them.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a preprocessing step in the Sphinx configuration to work around a limitation in sphinx-gallery that prevents nested example directories. The approach involves copying the examples to a temporary directory and flattening the subdirectory structure by renaming nested folders.

My review focuses on improving the maintainability and readability of the new preprocessing script in conf.py. I've suggested encapsulating the logic within a function to keep the global namespace clean and moving imports to the top of the script, which is standard Python practice. I also corrected a minor typo in a comment.

@github-actions
Copy link

github-actions bot commented Dec 6, 2025

Workflow report

workflow report corresponding to commit 79bb645
Commiter email is timothee.davidcleris@proton.me

Pre-commit check report

Pre-commit check: ✅

trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check for merge conflicts................................................Passed
check that executables have shebangs.....................................Passed
check that scripts with shebangs are executable..........................Passed
check for added large files..............................................Passed
check for case conflicts.................................................Passed
check for broken symlinks................................................Passed
check yaml...............................................................Passed
detect private key.......................................................Passed
No-tabs checker..........................................................Passed
Tabs remover.............................................................Passed
Validate GitHub Workflows................................................Passed
clang-format.............................................................Passed
black....................................................................Passed
ruff check...............................................................Passed
Check doxygen headers....................................................Passed
Check license headers....................................................Passed
Check #pragma once.......................................................Passed
Check SYCL #include......................................................Passed
No ssh in git submodules remote..........................................Passed

Test pipeline can run.

Clang-tidy diff report

No relevant changes found.
Well done!

You should now go back to your normal life and enjoy a hopefully sunny day while waiting for the review.

@tdavidcl tdavidcl marked this pull request as draft December 6, 2025 14:15
@tdavidcl tdavidcl added draft and removed in-review labels Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant