Repository navigation
build: modernize packaging with uv, pyproject.toml and semantic-release - #476
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #476 +/- ##
=======================================
Coverage 95.90% 95.91%
=======================================
Files 18 18
Lines 488 489 +1
Branches 55 55
=======================================
+ Hits 468 469 +1
Misses 19 19
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
irfanuddinahmad
left a comment
There was a problem hiding this comment.
Before merging, a PyPI owner needs to add a trusted publisher for this repo with workflow release.yml. Earlier releases used an API token, so the first OIDC publish will fail without it.
| env: | ||
| TOXENV: ${{ matrix.toxenv }} | ||
| run: tox | ||
| run: uv run tox -e ${{ matrix.toxenv }} |
There was a problem hiding this comment.
Please use uv run --locked tox -e ${{ matrix.toxenv }}. Without --locked, uv run silently re-locks when uv.lock is stale instead of failing. It also matches i18n-tools, codejail-includes and platform-plugin-aspects.
There was a problem hiding this comment.
uv sync --locked --group ci in the previous step already fails on a stale uv.lock, so --locked on uv run is redundant.
| "tox-uv", | ||
| "coverage", | ||
| ] | ||
| dev = [ |
There was a problem hiding this comment.
Please add {include-group = "doc"} to dev. Without it, make requirements && make docs fails on a fresh clone.
There was a problem hiding this comment.
dev already includes doc transitively via quality (quality has {include-group = "doc"}), so make requirements && make docs works on a fresh clone.
1b52648 to
870dbc0
Compare
Move to PEP 621 metadata, PEP 735 dependency groups locked with uv, a src/ layout, and python-semantic-release with OIDC publishing, as part of the Python repo modernization effort (openedx/public-engineering#506). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f3be561 to
778c0cc
Compare
Important
PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.
Modernize
django-user-tasksPart of openedx/public-engineering#506
Summary
src/layout.setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata).uvwith PEP 735 dependency groups; commituv.lock..coveragercintopyproject.toml.astral-sh/setup-uv; SHA-pin all actions.python-semantic-release+release.yml(OIDC trusted publishing), replacingpypi-publish.yml..readthedocs.yamlto install thedocdependency group via uv.Removed/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,openedx.yaml(superseded bycatalog-info.yaml, which this repo already has; see openedx/public-engineering#349),.github/workflows/pypi-publish.ymlUpdated Makefile targets:
requirementspip-sync requirements/dev.txt→uv sync --locked --group devupgradeedx_lint write_uv_constraints+uv lock --upgradequalitytox -e quality; tox now callsmake qualitydocspython -m build/twine checkdirectly instead oftox -e docs; tox now callsmake docstestpytest→python -Wd -m pytest $(PYTEST_ARGS)so tox can call it with the same flags as beforedummy_translationssrc/user_tasksVersioning
setuptools-scmwithdynamic = ["version"]. Master had a PyPI publish workflow;python-semantic-releasecontrols the version string at release time via git tags. The baseline tagv4.0.0already exists for the latest PyPI release (4.0.0).Important Notes
uv.lockwas seeded with the exact versions pinned in master'srequirements/*.txt, so this PR does not upgrade any dependency. A fresh resolve pullededx-lint6.2.0, which crashes pylint (pii_termssetting must be configured); that upgrade is left for the weekly upgrade job.tests) and the toxenv matrix are unchanged, so branch-protection check names keep working.ci.ymlno longer triggers onpush;release.ymlcalls it viaworkflow_call, so CI does not run twice on merge.commitlint.ymlwas already present, so conventional commit format is already enforced on PRs.py3-none-anyinstead ofpy2.py3-none-any(the[bdist_wheel] universal = 1setting was dropped withsetup.cfg).CHANGELOG.rstis kept with a deprecation note at the top. Release notes now go only on GitHub Releases.Out of Scope
edx-lint6.2.0 upgradepii_termspylint setting, or pylint crashespii_termswhen the upgrade job bumps edx-lintdocs/conf.pyhardcodedversion = '0.3.0'celery53/54,drf313)Testing Notes
This PR has not been manually tested against the repo's own features. Testing relied on CI checks and local agent tooling (
make requirements,make quality,make test,python -m build). Repo-owner is encouraged to run the repo's feature tests before merging.🤖 Generated with Claude Code