Skip to content

fix(tools): update QA tooling, rules, exclusions, and relative path logging - #1322

Merged
Giom-V merged 3 commits into
google-gemini:mainfrom
Giom-V:format-all-cookbook-notebooks
Aug 19, 2026
Merged

fix(tools): update QA tooling, rules, exclusions, and relative path logging#1322
Giom-V merged 3 commits into
google-gemini:mainfrom
Giom-V:format-all-cookbook-notebooks

Conversation

@Giom-V

@Giom-V Giom-V commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary of Changes

This PR refines the in-repo Quality Assurance and linting tools under tools/:

  1. Table of Contents Link Checker (tools/check_readme_links.py):

    • Switched all path reporting, logging, and GitHub Actions warning annotations to use repository-relative paths (removing runner-specific absolute paths like /home/runner/work/cookbook/cookbook/).
    • Added EXCLUDED_README_NOTEBOOKS in tools/config.py to exempt notebooks that do not require Table of Contents entries (e.g. quickstarts/Authentication_with_OAuth.ipynb).
  2. Linting Rules & Severity Handling (tools/nblint/):

    • Configured style::second_person and gemini::sdk_package as Severity.WARNING rather than build blockers.
    • Separated model selector format validation (errors on invalid syntax or missing default model) from ordering suggestions (warnings).
    • Expanded stub/redirect notebook detection in tools/config.py ("this notebook has moved").
  3. Formatting Sanitization (tools/nbfmt/):

    • Added automatic cleanup of stray escaped newlines next to Colab badges (e.g. </a>\\n).

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions Bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder component:quickstarts Issues/PR referencing quickstarts folder labels Aug 13, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 focuses on repository-wide maintenance and standardization. The primary goal is to ensure consistency across all Jupyter notebooks using the project's internal formatting and linting tools. Additionally, it improves developer documentation for these tools and cleans up repository ignore rules.

Highlights

  • Notebook Formatting: Ran the in-repo formatting tool (tools/nbfmt_cli.py) across all 146 notebooks to standardize JSON formatting, remove trailing whitespace, and clean cell/root metadata.
  • Documentation Updates: Updated CONTRIBUTING.md to provide clearer instructions on using the in-repo nbfmt and nblint tools.
  • Bug Fixes: Fixed a malformed JSON syntax error in examples/gemini_google_adk_model_guardrails.ipynb.
  • Repository Cleanup: Updated .gitignore to include Python cache artifacts (**/__pycache__/ and *.pyc).
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/new_examples_links_in_table_of_content.yml
    • .github/workflows/notebooks.yaml
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 the 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 counterproductive. 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.

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.

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

Copy link
Copy Markdown
Contributor

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 updates the repository's .gitignore to ignore Python cache artifacts and revises CONTRIBUTING.md to use the in-repo formatting and linting tools (nbfmt_cli.py and nblint_cli.py) instead of the deprecated tensorflow_docs tools. Additionally, numerous example notebooks are updated to use the new google-genai SDK (from google import genai) and to install the correct package version (google-genai>=2.9.0). Since the only review comment was on a file not modified in this pull request, it has been removed, and I have no further feedback to provide.

@Giom-V
Giom-V force-pushed the format-all-cookbook-notebooks branch from 908ed2b to 57416b1 Compare August 14, 2026 12:12
@Giom-V Giom-V changed the title chore: format all notebooks with in-repo nbfmt tool chore: format all notebooks with in-repo nbfmt and link unlinked notebooks in readmes Aug 14, 2026
@Giom-V
Giom-V force-pushed the format-all-cookbook-notebooks branch from ba834fb to fb31f5e Compare August 19, 2026 08:28
@Giom-V Giom-V changed the title chore: format all notebooks with in-repo nbfmt and link unlinked notebooks in readmes fix(tools): update QA tooling, rules, exclusions, and relative path logging Aug 19, 2026
@Giom-V
Giom-V requested a review from kkorpal August 19, 2026 09:09
@Giom-V
Giom-V merged commit e2fb9c9 into google-gemini:main Aug 19, 2026
10 checks passed
@Giom-V
Giom-V deleted the format-all-cookbook-notebooks branch August 19, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:examples Issues/PR referencing examples folder component:quickstarts Issues/PR referencing quickstarts folder status:awaiting review PR awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant