Skip to content

feat: move ruff hooks locally; add output for ci/cd autofixes; update ruff version; and fix new issues#709

Merged
jakelorocco merged 1 commit intomainfrom
jal/output-ruff-diffs-cicd
Mar 20, 2026
Merged

feat: move ruff hooks locally; add output for ci/cd autofixes; update ruff version; and fix new issues#709
jakelorocco merged 1 commit intomainfrom
jal/output-ruff-diffs-cicd

Conversation

@jakelorocco
Copy link
Copy Markdown
Contributor

@jakelorocco jakelorocco commented Mar 19, 2026

Misc PR

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

  • Link to Issue: Fixes N/A

Adds output for ruff checks in github action runners for easier debugging. Doesn't change behavior of local precommit ruff checks.

cicd:

Ruff formatter...........................................................Failed
- hook id: ruff-format
- exit code: 1
122 files already formatted
--- test/backends/test_huggingface.py
+++ test/backends/test_huggingface.py
@@ -52,7 +52,7 @@
     Uses Granite 3.3-8b for aLoRA adapter compatibility.
     The ibm-granite/rag-intrinsics-lib repository only has adapters for
     Granite 3.3 models. Granite 4 adapters are not yet available.
-    
+
     """
     backend = LocalHFBackend(
         model_id="ibm-granite/granite-3.3-8b-instruct",
1 file would be reformatted, 121 files already formatted
122 files already formatted
119 files already formatted
Ruff linter..............................................................Failed
- hook id: ruff
- exit code: 1
I001 [*] Import block is un-sorted or un-formatted
  --> test/backends/test_huggingface.py:1:1
   |
 1 | / import asyncio
 2 | | import faulthandler
 3 | | import os
 4 | | import random
 5 | | import time
 6 | | from collections.abc import Coroutine
 7 | | import sys
 8 | | from copy import copy
 9 | | from typing import Annotated, Any
10 | | from unittest.mock import Mock
11 | |
12 | | import pydantic
13 | | import pytest
14 | | import torch
   | |____________^
15 |
16 |   # Mark all tests in this module with backend and resource requirements
   |
help: Organize imports
W293 Blank line contains whitespace
  --> test/backends/test_huggingface.py:55:1
   |
53 |     The ibm-granite/rag-intrinsics-lib repository only has adapters for
54 |     Granite 3.3 models. Granite 4 adapters are not yet available.
55 |     
   | ^^^^
56 |     """
57 |     backend = LocalHFBackend(
   |
help: Remove whitespace from blank line

local precommit still hides autofixes:

Ruff formatter...........................................................Failed
- hook id: ruff-format
- files were modified by this hook
Ruff linter..............................................................Failed
- hook id: ruff
- exit code: 1
- files were modified by this hook

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

@github-actions
Copy link
Copy Markdown
Contributor

The PR description has been updated. Please fill out the template for your PR to be reviewed.

@jakelorocco jakelorocco changed the title feat: move ruff hooks locally; add output for ci/cd autofixes; update feat: move ruff hooks locally; add output for ci/cd autofixes; update ruff version; and fix new issues Mar 19, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Mar 19, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

@jakelorocco jakelorocco force-pushed the jal/output-ruff-diffs-cicd branch from 3cc5a2a to 90e5a34 Compare March 19, 2026 19:54
@jakelorocco jakelorocco marked this pull request as ready for review March 19, 2026 20:15
@jakelorocco jakelorocco requested a review from a team as a code owner March 19, 2026 20:15
Copy link
Copy Markdown
Member

@psschwei psschwei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
checked out branch. made some changes. committing them triggered the ruff checks (first time ruff failed but made a fix, second time passed).

@jakelorocco jakelorocco added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit f0e778e Mar 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants