Skip to content

Conversation

@Andrei-Treil
Copy link
Contributor

#17

@davidgantman
Copy link
Collaborator

Mark the PR as a draft until you're ready for review.

@Andrei-Treil Andrei-Treil marked this pull request as draft August 4, 2025 17:12
@davidgantman
Copy link
Collaborator

Make sure to rebase your changes, when you're ready for review.

@davidgantman davidgantman linked an issue Aug 4, 2025 that may be closed by this pull request
@davidgantman
Copy link
Collaborator

Commit: "Move LLM prompts to markdown files" should be in a separate PR with a corresponding issue

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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


- repo: local
hooks:
- id: auto-signoff
Copy link
Collaborator

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.

Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link
Contributor Author

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(-)

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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?

Copy link
Contributor Author

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?

Copy link
Collaborator

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.

@davidgantman
Copy link
Collaborator

davidgantman commented Aug 4, 2025

"[Add dev dependancy install]"(c3c4c1b)
s/dependancy/dependency/ 😜

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.

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>
@Andrei-Treil
Copy link
Contributor Author

@davidgantman

Commit: "Move LLM prompts to markdown files" should be in a separate PR with a corresponding issue

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.

@Andrei-Treil Andrei-Treil marked this pull request as ready for review August 18, 2025 21:04
@davidgantman davidgantman changed the title WIP: Ruff CI/CD integration Ruff CI/CD integration Aug 18, 2025
@davidgantman
Copy link
Collaborator

nit: In your git config, your user should be rather than your handle,

Copy link
Collaborator

@davidgantman davidgantman left a 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.

Copy link
Collaborator

@davidgantman davidgantman left a 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

@Andrei-Treil
Copy link
Contributor Author

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.

@davidgantman
Copy link
Collaborator

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.

@Andrei-Treil
Copy link
Contributor Author

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?

@davidgantman
Copy link
Collaborator

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.

@Andrei-Treil
Copy link
Contributor Author

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 .markdownlint.json:

"MD013": false, // Disable rule MD013 (line length)

Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
@Andrei-Treil
Copy link
Contributor Author

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 (/patch_review/kernel/) should be removed from .gitignore?

@davidgantman
Copy link
Collaborator

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 (/patch_review/kernel/) should be removed from .gitignore?

Yes, patch_review/kernel is an outdated reference, it should be removed from .gitignore 👍

Andrei-Treil and others added 2 commits September 23, 2025 09:46
Signed-off-by: Andrei-Treil <80796927+Andrei-Treil@users.noreply.github.com>
Signed-off-by: Andrei-Treil <andrei.treil@gmail.com>
@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Nov 23, 2025
@github-actions github-actions bot closed this Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Python linter to GitHub Actions

2 participants