Skip to content

fix(deps): move ruff from runtime to dev dependency group - #2780

Open
rnetser wants to merge 1 commit into
mainfrom
fix/move-ruff-to-dev-deps
Open

fix(deps): move ruff from runtime to dev dependency group#2780
rnetser wants to merge 1 commit into
mainfrom
fix/move-ruff-to-dev-deps

Conversation

@rnetser

@rnetser rnetser commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What

Move ruff from runtime dependencies to the dev dependency group in pyproject.toml.

Why

ruff is a linter/formatter — it has no runtime purpose and adds ~11MB of platform-specific binaries to every pip install openshift-python-wrapper. It is already managed via pre-commit hooks (ruff-pre-commit), so it only needs to be available for local development.

Changes

  • Removed "ruff>=0.6.9" from [project] dependencies
  • Added "ruff>=0.6.9" to [dependency-groups] dev

Testing

  • prek run — all hooks passed
  • uv run --group tests pytest — 674 passed, 73.34% coverage

Made with Cursor

Summary by CodeRabbit

  • Chores
    • Moved Ruff from the application’s runtime dependencies to development-only dependencies, keeping production installations leaner.

ruff is a linter/formatter — it has no runtime purpose and adds ~11MB
of platform-specific binaries to every install. It is already managed
via pre-commit hooks (ruff-pre-commit), so it only needs to be
available for local development.

Move ruff from dependencies to [dependency-groups] dev.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: dc70b25d-2f69-40e7-981c-7ec993a0ce9b

📥 Commits

Reviewing files that changed from the base of the PR and between 54684e3 and e0b2830.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml

Walkthrough

Ruff was removed from runtime dependencies and added to the development dependency group in pyproject.toml.

Changes

Dependency declaration update

Layer / File(s) Summary
Ruff development dependency
pyproject.toml
Ruff is declared in the development dependency group.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: myakove

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes moving Ruff from runtime dependencies to the development dependency group.
Description check ✅ Passed The description explains what changed, why it changed, the affected dependencies, and the test results, but it does not use all template headings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/move-ruff-to-dev-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@redhat-qe-bot2

Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: Disabled for this repository
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: All label categories are enabled (default configuration)

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (PR author or approvers)
  • /hold cancel - Unblock PR merging (PR author or approvers)
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message
  • /security-override - Set security check runs to pass (maintainers only)
  • /security-override cancel - Re-run security checks

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest python-module-install - Test Python package installation
  • /retest conventional-title - Validate commit message format
  • /retest all - Run all available tests

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3
  • /cherry-pick-retry <branch> - Retry a failed cherry-pick (merged PRs only)

Branch Management

  • /rebase - Rebase this PR branch onto its base branch

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. Status Checks: All required status checks must pass
  3. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  4. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove
  • rnetser

Reviewers:

  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge
AI Features
  • Conventional Title: Mode: fix (claude/claude-opus-4-6-1m)
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6-1m)
Security Checks
  • Suspicious Path Detection: Monitors paths: .claude/, .vscode/, .cursor/, .devcontainer/, .pi/, .github/workflows/, .github/actions/
  • Committer Identity Check: Verifies last committer matches PR author
  • Mandatory: Security checks block merge (use /security-override to bypass — maintainers only)

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Move ruff from runtime deps to dev dependency group

⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Remove ruff from runtime install dependencies to avoid shipping unnecessary binaries.
• Add ruff to the dev dependency group for local lint/format workflows.
• Regenerate uv lock metadata to reflect the new dependency grouping.
Diagram

graph TD
  U["Runtime install (pip)"] --> P["pyproject.toml"] --> R["Runtime deps (no ruff)"]
  D["Dev install (uv --group dev)"] --> P --> G["Dev deps (includes ruff)"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Rely solely on pre-commit (remove ruff entirely from dependency sets)
  • ➕ No direct ruff installation needed; dev environment stays smaller
  • ➕ Pre-commit already pins and manages tool versions
  • ➖ Developers lose easy access to ruff CLI outside pre-commit runs
  • ➖ Harder to integrate ruff into custom editor/tasks without extra setup
2. Add an optional 'lint' extra instead of dev group
  • ➕ More explicit opt-in for lint tooling (e.g., pip install .[lint])
  • ➕ Works for users not using uv dependency groups
  • ➖ Another installation surface to document/support
  • ➖ Doesn’t align as directly with uv's dependency-group workflow

Recommendation: Keep the PR’s approach: moving ruff to the dev dependency group is the simplest way to avoid bloating runtime installs while preserving a first-class local developer workflow. The alternatives either reduce CLI usability (pre-commit only) or add extra packaging complexity (optional extras).

Files changed (2) +3 / -4

Other (2) +3 / -4
pyproject.tomlMove ruff from runtime dependencies into dev dependency group +1/-2

Move ruff from runtime dependencies into dev dependency group

• Removes 'ruff' from '[project] dependencies' so it is not installed at runtime. Adds 'ruff' to '[dependency-groups].dev' to keep it available for local development tooling.

pyproject.toml

uv.lockUpdate lockfile dependency grouping for ruff +2/-2

Update lockfile dependency grouping for ruff

• Updates the resolved metadata to remove 'ruff' from the runtime dependency set and include it in the 'dev' group, keeping the lockfile consistent with 'pyproject.toml'.

uv.lock

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@rnetser

rnetser commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/verified

@rnetser

rnetser commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

/cherry-pick v4.22
/cherry-pick v4.21
/cherry-pick v4.20
/cherry-pick v4.19
/cherry-pick v4.18

@redhat-qe-bot2

Copy link
Copy Markdown

Cherry-pick requested for PR: fix(deps): move ruff from runtime to dev dependency group by user rnetser
Adding label/s cherry-pick-v4.18 for automatic cherry-pick once the PR is merged

@redhat-qe-bot2

Copy link
Copy Markdown

Cherry-pick requested for PR: fix(deps): move ruff from runtime to dev dependency group by user rnetser
Adding label/s cherry-pick-v4.21 for automatic cherry-pick once the PR is merged

@redhat-qe-bot2

Copy link
Copy Markdown

Cherry-pick requested for PR: fix(deps): move ruff from runtime to dev dependency group by user rnetser
Adding label/s cherry-pick-v4.20 for automatic cherry-pick once the PR is merged

@redhat-qe-bot2

Copy link
Copy Markdown

Cherry-pick requested for PR: fix(deps): move ruff from runtime to dev dependency group by user rnetser
Adding label/s cherry-pick-v4.22 for automatic cherry-pick once the PR is merged

@redhat-qe-bot2

Copy link
Copy Markdown

Cherry-pick requested for PR: fix(deps): move ruff from runtime to dev dependency group by user rnetser
Adding label/s cherry-pick-v4.19 for automatic cherry-pick once the PR is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants