-
Notifications
You must be signed in to change notification settings - Fork 13
Fix/10 add autoformat.sh script #11
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
Fix/10 add autoformat.sh script #11
Conversation
Summary of ChangesHello @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 Highlights
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.).
| echo "Formatting complete." | |
| echo "Formatting complete." | |
31ac883 to
9bcdf64
Compare
| @@ -0,0 +1,27 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
|
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 I think the PR is merged successfully right ? the script is visible in the repo. |
The CONTRIBUTING.md file refers to an
autoformat.shscriptfor 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