-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add isort and autoflake to CI #29
Conversation
Warning Rate Limit Exceeded@evangriffiths has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 55 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent update introduces enhancements to the Python Continuous Integration (CI) pipeline by incorporating workflows for code formatting verification. Specifically, it adds support for Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration 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.
autoflake: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/python_prepare | ||
- name: Check with autoflake | ||
run: | | ||
poetry run autoflake --in-place --remove-all-unused-imports --remove-unused-variables --recursive . | ||
git diff --exit-code --quiet || exit 1 |
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.
Consider adding a step to install autoflake
before running it, unless it's guaranteed to be available in the environment set up by .github/actions/python_prepare
. If autoflake
is not installed by default, the job will fail due to the missing dependency.
+ - name: Install autoflake
+ run: poetry add --dev autoflake
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
autoflake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/python_prepare | |
- name: Check with autoflake | |
run: | | |
poetry run autoflake --in-place --remove-all-unused-imports --remove-unused-variables --recursive . | |
git diff --exit-code --quiet || exit 1 | |
autoflake: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/python_prepare | |
- name: Install autoflake | |
run: poetry add --dev autoflake | |
- name: Check with autoflake | |
run: | | |
poetry run autoflake --in-place --remove-all-unused-imports --remove-unused-variables --recursive . | |
git diff --exit-code --quiet || exit 1 |
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.
autoflake comes pre-installed
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.
@evangriffiths: Understood, thank you for clarifying that autoflake
comes pre-installed. This ensures the workflow setup is streamlined and efficient. If there's anything else you need, feel free to let me know!
New Learnings Added
User: evangriffiths
PR: gnosis/prediction-market-agent#29
File: .github/workflows/python_ci.yaml:54-62
Timestamp: 2024-02-15T11:28:30.863Z
Learning: `autoflake` comes pre-installed in the environment set up by `.github/actions/python_prepare`.
Note: Learnings are effective only in the context of specific code segments. To apply general coding guidelines, please configure path-based instructions.
isort: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ./.github/actions/python_prepare | ||
- name: Check with isort | ||
run: | | ||
poetry run isort --profile black . | ||
git diff --exit-code --quiet || exit 1 |
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.
Similar to the autoflake
job, ensure isort
is installed before attempting to run it. Add a step to install isort
if it's not part of the environment prepared by .github/actions/python_prepare
.
+ - name: Install isort
+ run: poetry add --dev isort
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/python_prepare | |
- name: Check with isort | |
run: | | |
poetry run isort --profile black . | |
git diff --exit-code --quiet || exit 1 | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/python_prepare | |
- name: Install isort | |
run: poetry add --dev isort | |
- name: Check with isort | |
run: | | |
poetry run isort --profile black . | |
git diff --exit-code --quiet || exit 1 |
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.
isort comes pre-installed
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.
@evangriffiths: Understood, thank you for clarifying that isort
comes pre-installed. It seems no changes are necessary regarding the installation step for isort
in the workflow. If there's anything else that needs attention, feel free to let me know.
Summary by CodeRabbit
autoflake
andisort
.