Skip to content

Migrate to uv, setuptools-scm, prek, and ruff#14457

Draft
rtibbles wants to merge 9 commits intolearningequality:release-v0.19.xfrom
rtibbles:uv_or_not_uv_that_is_the_question
Draft

Migrate to uv, setuptools-scm, prek, and ruff#14457
rtibbles wants to merge 9 commits intolearningequality:release-v0.19.xfrom
rtibbles:uv_or_not_uv_that_is_the_question

Conversation

@rtibbles
Copy link
Member

Summary

Migrate Kolibri's Python tooling from pip/tox/setup.py to uv, and replace flake8+black with ruff.

  • Dev environments use uv sync --group dev for venv creation, Python version management, and dependency installation
  • Versioning handled by setuptools-scm (replaces custom kolibri/utils/version.py generation logic)
  • CI test workflows use uv for Python 3.8+; EOL Python (3.6, 3.7) remains on Docker containers with pip
  • Build pipeline (make staticdeps) stays on pip — uv cannot resolve for Python 3.6
  • Pre-commit replaced with prek; flake8, black, reorder-python-imports replaced with ruff

References

Reviewer guidance

Local verification before PR:

  • make staticdeps tested in a Python 3.6 container — installs correctly
  • uv build produces wheel and tarball
  • Full test suite passes on Python 3.6 via PYTHONPATH
  • Version utility tests (74) pass on 3.8+ via uv

For review:

  • The ruff reformatting commit touches 439 files — review the config commits individually, not the reformat
  • CI is the main verification — check that all workflow jobs pass across the Python version matrix
  • Tests are not yet run against a built whl file — that's a deliberate follow-up

AI usage

This PR was authored collaboratively with Claude Code. Claude implemented the migration based on a brainstormed design, with each decision reviewed and approved interactively. Tests and build were verified in Python 3.6 containers.

@github-actions github-actions bot added DEV: dev-ops Continuous integration & deployment DEV: backend Python, databases, networking, filesystem... APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: User Re: User app (sign-in, sign-up, user profile, etc.) APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) SIZE: very large labels Mar 26, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 26, 2026

Build Artifacts

@rtibbles rtibbles force-pushed the uv_or_not_uv_that_is_the_question branch from c290799 to f66bbd4 Compare March 26, 2026 23:17
@rtibbles rtibbles force-pushed the uv_or_not_uv_that_is_the_question branch 3 times, most recently from 416e76e to 34d457b Compare March 27, 2026 02:34
@rtibbles rtibbles force-pushed the uv_or_not_uv_that_is_the_question branch from 34d457b to 5a4c15d Compare March 27, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) APP: Facility Re: Facility App (user/class management, facility settings, csv import/export, etc.) APP: Learn Re: Learn App (content, quizzes, lessons, etc.) APP: Setup Wizard Re: Setup Wizard (facility import, superuser creation, settings, etc.) APP: User Re: User app (sign-in, sign-up, user profile, etc.) DEV: backend Python, databases, networking, filesystem... DEV: dev-ops Continuous integration & deployment SIZE: large SIZE: very large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant