Skip to content

Migrate to uv.lock, prek, and ruff #5808

Description

@bjester

❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Overview

Migrate from pip/setup.cfg to uv tooling, and replace flake8/black with ruff

Complexity: Low
Target branch: unstable

Context

Kolibri Studio was previously migrated to uv, but only a partial migration. Currently, Studio still uses compiled requirements files using uv pip compile. We'd like to fully transition Studio to uv and its uv.lock tracking for dependencies.

The Change

  • Convert setup.cfg and comiled requirements.txt and requirements-dev.txt to pyproject.toml with PEP 735 dependency groups
  • Replace flake8/black/reorder-python-imports with ruff
  • Replace pre-commit with prek
  • Add yamlfmt and actionlint to pre-commit hooks
  • Update pre-commit CI workflow for prek replacement
  • Configure exclude-newer = "7 days" in [tool.uv] for supply chain safety
  • Add uv-lock pre-commit hook (from astral-sh/uv-pre-commit) to keep uv.lock in sync
  • Update developer documentation

Acceptance Criteria

  • pyproject.toml replaces setup.cfg as the single source of project metadata and configuration
  • uv.lock replaces requirements*.in and requirements*.txt
  • Linting and formatting handled by ruff
  • Pre-commit hooks use prek with ruff, yamlfmt, and actionlint
  • exclude-newer cooldown configured in pyproject.toml
  • uv-lock pre-commit hook added to .pre-commit-config.yaml
  • All existing tests pass
  • Developer documentation updated

References

AI usage

This issue is a revised copy of another issue drafted by Claude Code, based on the Kolibri uv migration work.

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions