learningequality / learningequality/studio

Migrate to uv.lock, prek, and ruff

Open
#5,808 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DEV: dev-ops TAG: dependencies TAG: dev experience TAG: performance
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing setup.cfg, the compiled requirements files, pyproject.toml, and .pre-commit-config.yaml, then compare the referenced Kolibri migration. Check the pre-commit CI workflow and developer documentation as part of the migration. Done means the listed configuration files and hooks are replaced, uv.lock is tracked, documentation is updated, and all existing tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, ci-cd, documentation, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.