-
Notifications
You must be signed in to change notification settings - Fork 93
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
Cog 650 replace pylint #382
Conversation
Resolve syntax issue with cognify router Fix
Added formatting and linting on pre-commit hook Feature COG-650
Update ruff lint options in pyproject file Chore
Added linting check with ruff in github actions Test COG-650
WalkthroughThis pull request introduces new GitHub Actions workflows for code formatting and linting using Ruff, along with a configuration for pre-commit hooks. The workflows are triggered on pull requests and ensure that code adheres to specified formatting and linting rules. Additionally, the Changes
Sequence DiagramsequenceDiagram
participant Dev as Developer
participant PC as Pre-Commit
participant Ruff as Ruff Linter/Formatter
participant GHA as GitHub Actions
Dev->>PC: Commit code
PC->>Ruff: Run linting and formatting
Ruff-->>Dev: Provide feedback
Dev->>GHA: Open Pull Request
GHA->>Ruff: Run linting and formatting checks
Ruff-->>GHA: Validation results
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Remove changes to cognify router Refactor COG-650
Test if code is formatted for cognee Test COG-650
Rename ruff gh actions to be more understandable Refactor COG-650
Remove checking of ruff lint and format on push Chore COG-650
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.
Actionable comments posted: 2
🧹 Nitpick comments (3)
.pre-commit-config.yaml (2)
4-10
: Consider updating pre-commit-hooks versionThe pre-commit-hooks repository is using v3.2.0 which is quite old. The latest version is v4.5.0 which includes various improvements and bug fixes.
- rev: v3.2.0 + rev: v4.5.0
11-20
: Consider adding additional Ruff configuration parametersThe basic setup looks good, but consider adding these parameters to enhance functionality:
args: [--fix]
for auto-fixing issuesargs: [--line-length=100]
to match your pyproject.toml configuration- id: ruff types_or: [ python, pyi ] + args: [--fix, --line-length=100] - id: ruff-format types_or: [ python, pyi ] + args: [--line-length=100]pyproject.toml (1)
77-77
: Fix formatting: Remove extra empty linesRemove the extra empty lines after the pre-commit dependency.
pre-commit = "^4.0.1" -
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lock
is excluded by!**/*.lock
📒 Files selected for processing (4)
.github/workflows/ruff_format.yaml
(1 hunks).github/workflows/ruff_lint.yaml
(1 hunks).pre-commit-config.yaml
(1 hunks)pyproject.toml
(2 hunks)
✅ Files skipped from review due to trivial changes (2)
- .github/workflows/ruff_lint.yaml
- .github/workflows/ruff_format.yaml
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
9573981 | Triggered | Generic Password | a90a232 | notebooks/hr_demo.ipynb | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
add check for ruff formatting
add check for ruff linting
add git hook for ruff ( run locally:
pre-commit install
to add git hook for ruff. Make sure to run poetry install beforehand to install pre-commit )Run
ruff check
to lint code in localRun
ruff format
to format code in localSummary by CodeRabbit
Summary by CodeRabbit
New Features
Dependencies
pre-commit
as a new dependency for the project.Configuration