Migrate to uv, ruff, and prek#212
Conversation
rtibbles
left a comment
There was a problem hiding this comment.
Only one thing that I can see needs changing so far. One question.
Also, would be good to cleanup the commits into a more logical grouping. Maybe a single commit for the code reformatting that we can add to a git blame ignore revs file.
pyproject.toml
Outdated
| # Bump periodically — prevents installing packages published less than 7 days ago. | ||
| # uv requires an ISO 8601 date, not a relative duration. | ||
| # To update: set to today's date minus 7 days in YYYY-MM-DD format. | ||
| exclude-newer = "2026-03-24T00:00:00Z" |
There was a problem hiding this comment.
Or we could just set
exclude-newer = "7 days"
It is not restricted to absolute timestamps, because that would be very silly: https://docs.astral.sh/uv/reference/settings/#exclude-newer
There was a problem hiding this comment.
Changed to exclude-newer = "7 days". Much better than manually bumping a date.
Replace pip/tox/setup.py with uv and pyproject.toml using setuptools-scm for versioning. Replace flake8/black/reorder-python-imports with ruff. Replace pre-commit with prek. Update all CI/CD workflows to use astral-sh/setup-uv@v7 and j178/prek-action@v2. Add yamlfmt, actionlint, and uv-lock pre-commit hooks. Release workflow now produces both sdist and wheel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Automated formatting pass — no functional changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
9c65823 to
fdf3066
Compare
|
Cleaned up the commit history into two commits:
Also switched |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Added |
rtibbles
left a comment
There was a problem hiding this comment.
As long as tests pass, this is good to go.
Summary
Migrates le-utils from pip/tox/setup.py to uv, replaces flake8/black with ruff, and replaces pre-commit with prek — matching the approach taken in learningequality/kolibri#14457.
setup.py/setup.cfg/tox.ini/MANIFEST.in/requirements-*.txtreplaced bypyproject.tomlwith PEP 735 dependency groupsastral-sh/setup-uv@v7with cachingexclude-newerconfigured for supply chain safetyReferences
Closes #211
Reference: learningequality/kolibri#14457
Reviewer guidance
fetch-depth: 0is required on checkout steps that trigger setuptools-scm (test and publish workflows, but NOT EOL Python jobs which usePYTHONPATHinstead).github/workflows/pypi-publish.ymland.github/workflows/npm-publish.yml— verify these release workflows have correct permissions and build stepsuv sync --group dev && uv run pytest -sAI usage
This PR was implemented by Claude Code following a detailed plan based on the Kolibri uv migration (learningequality/kolibri#14457). All tests were verified passing, ruff formatting was applied, and build artifacts were validated (sdist + wheel with correct setuptools-scm versioning).
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?