-
Notifications
You must be signed in to change notification settings - Fork 17
Ruff CI/CD integration #28
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
Conversation
|
Mark the PR as a draft until you're ready for review. |
|
Make sure to rebase your changes, when you're ready for review. |
394c0b9 to
08d1a26
Compare
|
Commit: "Move LLM prompts to markdown files" should be in a separate PR with a corresponding issue |
.pre-commit-config.yaml
Outdated
| repos: | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| # Use the latest stable version of Ruff | ||
| rev: v0.12.7 # Replace with the desired Ruff version |
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.
No way to default to latest?
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.
Defaulting to latest isn't supported, instead you're meant to run pre-commit autoupdate which will update the pre-commit dependencies to their latest versions. This could be automated through a scheduled GitHub action or using pre-commit ci
.pre-commit-config.yaml
Outdated
|
|
||
| - repo: local | ||
| hooks: | ||
| - id: auto-signoff |
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.
I'm not sure if signing off is supposed to be automatic, my understanding was that signing off is the developer's way of acknowledging the DCO.
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.
I can remove the auto add feature and just have it block the commit instead
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.
I don't want to block the commit, is it possible to just give a warning that they can ignore? The missing SOB will still be caught and blocked when reviewing the PR.
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.
In theory the error acts as a warning, since the pre-commit checks can be avoided by running git commit -m "Test" --no-verify.
I could make it just log the warning, but this would be missed if using non-cli for Git (for example the VSCode source control extension):
git commit -m "Test"
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/andrei/.cache/pre-commit/patch1754334020-138083.
ruff check...........................................(no files to check)Skipped
ruff format..........................................(no files to check)Skipped
[INFO] Restored changes from /home/andrei/.cache/pre-commit/patch1754334020-138083.
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/andrei/.cache/pre-commit/patch1754334020-138102.
ruff check...........................................(no files to check)Skipped
ruff format..........................................(no files to check)Skipped
Check commit signoff.....................................................Passed
- hook id: check-signoff
- duration: 0s
WARNING: Missing Signed-off-by line
Use: git commit -s
[INFO] Restored changes from /home/andrei/.cache/pre-commit/patch1754334020-138102.
[import-adjustment 1bde428] Test
1 file changed, 3 insertions(+), 7 deletions(-)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.
Good point, and thanks for the example? What do other projects do? I think blocking the commit is fine like you said, to make sure that GUI clients still block the commit so that users don't need to deal with going back and amending their changes for something minimal like SOB.
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.
From what I can tell, most projects just run the DCO check on PRs through GitHub actions. In instances where DCO check is included in a pre-commit hook, the common behavior is to block the commit.
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.
Let's do the common behavior for including the DCO check. I'm fine with blocking as long as we mention --force can bypass the precommit checks in CONTRIBUTING.md. Make sure that it's easy to understand how to bypass so that potential contributors are aware that they can bypass it if they choose to do so, rather than being frustrated at the project for enforcing it.
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.
Can you also add markdown linting?
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.
What rules do we want to enforce for markdown?
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.
Whichever rules are enforced by the markdownlint extension on VS Code is good for now.
|
"[Add dev dependancy install]"(c3c4c1b) Also when you're ready for a proper review, can you squash commits wherever it makes sense to do so? e.g. "Fix actions install" should be squashed, no reason to merged a change and it's fix separately. |
3cc4cde to
c434266
Compare
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
fec40f9 to
6c4947a
Compare
Moving the prompts to markdown files was done as part of fixing the existing formatting issues, as the prompts exceed the maximum length of Python lines (88 characters). Since white space in prompts can impact LLM behavior, I felt it best to refactor the prompts in this way instead of editing the string definitions in the Python files. This PR seeks to add style guidelines and update the codebase to match these guidelines. Since the motivation for this change is to adhere to the new style guidelines, I think adding it here is appropriate. LMK if you disagree, I can instead separate this into a different PR and then rebase this PR once the changes are merged. |
|
nit: In your git config, your user should be rather than your handle, |
davidgantman
left a comment
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.
LGTM, will merge after testing locally.
davidgantman
left a comment
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 looks like Code Quality tests are failing
It's the markdown linting line length check (for future reference you can view the exact failing cases in the details of the Github Actions run). I can add a quick change to ignore the rule if you'd like, otherwise I would have to rewrite README and CONTRIBUTING, which seems unnecessary. |
Okay let's drop markdown linting check from this PR then. Once the README.md and CONTRIBUTING.md pass the markdown lint check, we can merge it. |
To clarify, do you want me to remove the markdown linting entirely from this PR? Additionally, does this mean that we do want to enforce line length rules for markdown files? |
Unless we can disable the line length rule for markdown files, yes, let's remove markdown linting from this PR. We can create a separate PR for it that includes fixes to README.md and CONTRIBUTING.md. |
Yes line length can be disabled for only markdown files, its a 1 line change to "MD013": false, // Disable rule MD013 (line length) |
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
|
Added the change, not sure why the code quality check isn't appearing in the logs -- debugging rn, will update you when done. Re: conflict resolution, can you confirm that the kernel dir ( |
Yes, |
Signed-off-by: Andrei-Treil <80796927+Andrei-Treil@users.noreply.github.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
e41c681 to
295e670
Compare
|
This pull request has been marked as stale due to 60 days of inactivity. To prevent automatic closure in 10 days, remove the stale label or add a comment. You can reopen a closed pull request at any time. |
#17