Skip to content

Conversation

@ariefshaik7
Copy link
Contributor

The CONTRIBUTING.md file refers to an autoformat.sh script
for running isort and pyink, but the file was missing
from the repository.

This commit adds the script to align the tooling with the
documentation.

Closes #10

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ariefshaik7, 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 enhances the developer experience and code consistency by adding a crucial autoformat.sh script. This script ensures that all Python code adheres to predefined formatting standards using isort and pyink, thereby aligning the project's tooling with its existing documentation and promoting a more uniform codebase.

Highlights

  • New Script Added: Introduced a new shell script named autoformat.sh to the repository.
  • Automated Formatting: The autoformat.sh script automates code formatting by running isort for import sorting and pyink for code style.
  • Documentation Alignment: This change resolves a discrepancy where CONTRIBUTING.md referenced autoformat.sh, but the file was previously missing from the repository.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/unit-tests.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 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
Contributor

@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 adds the autoformat.sh script, which was mentioned in CONTRIBUTING.md but was missing from the repository. The script correctly uses isort and pyink to format the codebase. My review includes one minor suggestion to add a newline at the end of the script to adhere to POSIX conventions for text files, which can help prevent issues with some command-line tools.

autoformat.sh Outdated
echo "Running pyink to reformat code..."
pyink .

echo "Formatting complete." No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

It's a good practice to end shell scripts and other text files with a newline character. This is part of the POSIX standard for text files and can prevent unexpected behavior with some command-line tools that process text files (like cat, wc, etc.).

Suggested change
echo "Formatting complete."
echo "Formatting complete."

@ariefshaik7 ariefshaik7 force-pushed the fix/10-add-autoformat.sh-script branch from 31ac883 to 9bcdf64 Compare November 1, 2025 11:42
@@ -0,0 +1,27 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you follow this file to update it: https://github.com/google/adk-python/blob/main/autoformat.sh

@@ -0,0 +1,40 @@
name: Python Unit Tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

there is another contributed merged on this. could you remove or update this?

Copy link
Contributor Author

@ariefshaik7 ariefshaik7 Nov 4, 2025

Choose a reason for hiding this comment

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

@hangfei i just found out that the CONTRIBUTING.md file states to use the "uv sync --extra test --extra eval --extra a2a" but these are not in project.optional-dependencies in pyproject.toml and would add those and update this and eval and a2a are not required in this i guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Raised a new issue #12 and PR for this

@hangfei
Copy link
Collaborator

hangfei commented Nov 5, 2025

all the checks passed but the merged button greyed out. Seems there is bug with Github.

Could you create a new PR to see if this can be fixed?

@hangfei hangfei merged commit 0f18f8b into google:main Nov 5, 2025
6 checks passed
@ariefshaik7
Copy link
Contributor Author

@hangfei I think the PR is merged successfully right ? the script is visible in the repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: autoformat.sh script is missing but referenced in CONTRIBUTING.md

2 participants