docs(py): upgrade plugin docstrings to landing-page hero style with inline return shapes#5650
docs(py): upgrade plugin docstrings to landing-page hero style with inline return shapes#5650huangjeff5 wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new docstring style guide (SKILL.md) for Genkit Python packages, mandating the "Landing Page Hero Snippet" pattern. This pattern focuses on clean, product-oriented code examples with numbered steps and inline return shape annotations (# =>), while removing verbose ELI5 explanations and ASCII diagrams. Accordingly, docstrings across multiple packages (including genkit-anthropic, genkit-django, genkit-fastapi, genkit-flask, genkit-googleai, genkit-googlecloud, genkit-middleware, genkit-ollama, genkit-openai, and genkit-vertexai) have been refactored to align with this style. The review feedback correctly identifies several bugs in the newly introduced code examples, such as incorrect attribute access on evaluation results, long-running operations, and media parts, which would lead to AttributeErrors at runtime.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request streamlines and simplifies the module-level docstrings across multiple Genkit Python packages by removing large ASCII diagrams, ELI5 explanations, and complex architecture overviews. These are replaced with concise descriptions, updated requirements, and cleaner, more practical code examples. The feedback points out a missing asyncio import in the veo.py example code block, which is necessary to make the snippet fully functional and copy-pasteable.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
eb013e2 to
a7c93ba
Compare
…e snippets across plugins
…-page hero style with inline shapes and clean multi-line comments
…with landing-page hero snippets
…a part attribute access in docstrings
a7c93ba to
8580b26
Compare
Description
As part of PR stack #3 (branched off PR #2
reorg/py-plugins), this pull request audits all Genkit Python plugin and core packages to replace verbose ELI5 explanations and ASCII data-flow diagrams with professional, product-oriented landing-page hero snippets.Key highlights:
genkit-docstring-styleskill defining required code block formatting.# 1. ...,# 2. ...,# 3. ...comments guiding developers through initialization and execution.# =>): Illustrates expected response shapes directly inline without requiring execution.#lines without escape codes like\n.googleai/gemini-flash-latest,googleai/gemini-pro-latest, orvertexai/...equivalents across generation snippets.Base Branch
Branches off of and targets
reorg/py-plugins(#5644).