Repository navigation
build: modernize edx-val repo to uv + pyproject.toml - #646
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #646 +/- ##
=======================================
Coverage 97.63% 97.64%
=======================================
Files 28 28
Lines 3262 3263 +1
Branches 124 124
=======================================
+ Hits 3185 3186 +1
Misses 60 60
Partials 17 17
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:
|
|
Looks good, and the lock matches master's pins. One thing: the README dev setup still says |
|
Fixed in 39a4a2f. |
irfanuddinahmad
left a comment
There was a problem hiding this comment.
Please add tag_format = "v{version}", major_on_zero = false and allow_zero_version = true to [tool.semantic_release], use fallback_version = "0.0.0", and add a top-level permissions: contents: read to ci.yml, since run_ci now calls it from release.yml.
This flips the Makefile/tox direction (tox now calls make). Fine by me since it's the direction feanil prefers, but it's beyond the migration itself, so flag it in the description.
Move packaging to PEP 621 metadata with setuptools-scm, manage dependencies with uv dependency groups and a committed uv.lock, and release via python-semantic-release with OIDC trusted publishing, as described in openedx/public-engineering#506. CI tokens are read-only since ci.yml is now reused by release.yml. Co-Authored-By: Claude Opus 5.5 <[email protected]>
657d0aa to
a4137a5
Compare
Important
PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.
Modernize
edx-valPart of openedx/public-engineering#506
Summary
edxval.src/layout.setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata).uvwith PEP 735 dependency groups; commituv.lock..coveragerccoverage config intopyproject.toml.check-reserved-keywords.ymlto useastral-sh/setup-uv; SHA-pin all actions.permissions: contents: readinci.yml, sincerelease.ymlnow reuses it viaworkflow_call.python-semantic-release+release.yml(OIDC trusted publishing), replacing the token-basedpypi-publish.yml.requires-python = ">=3.12".uv.Removed/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,.github/workflows/pypi-publish.ymlRemoved Makefile targets:
$(COMMON_CONSTRAINTS_TXT)requirements/common_constraints.txtfor pip-compile;edx_lint write_uv_constraintsnow merges the common constraints intopyproject.toml.Updated Makefile targets:
requirementsuv sync --locked --group devinstead of pip/pip-sync.upgradeedx_lint write_uv_constraints+uv lock --upgradeinstead of pip-compile.qualitypython -m buildandtwine checkdirectly instead oftox -e quality; tox now calls this target.testpython -Wd -m pytest(what tox ran on master) instead ofpython manage.py test; tox now calls this target.Python 3.11 dropped
Python 3.11 is no longer supported by Open edX, which targets Python 3.12. Removed from the tox envlist.
Versioning
setuptools-scmwithdynamic = ["version"]— master had a PyPI publish workflow;python-semantic-releasecontrols the version string at release time via git tags.[tool.semantic_release]setstag_format = "v{version}"to match the existingv5.0.1tags, plusmajor_on_zero = falseandallow_zero_version = trueso the config does not depend on tool defaults.Important Notes
edxval.settingsandtests/data/*stay out of it, as before.readmeis the static textedx-val, matching master'slong_description.README.rsthas RST errors that failtwine check.uv.lockkeeps master's pinned versions (e.g.djangorestframework==3.17.1). With 3.18,test_no_profile_validationfails, so that upgrade is left to the weekly upgrade job.tests/constants.pyandtests/test_api.pynow start withsrc/, because the tests open these files relative to the repo root.[pycodestyle]config moved fromsetup.cfgtotox.ini, because pycodestyle does not readpyproject.toml.docstox environment: this repo has nodocs/directory, nomake docstarget and no Sphinx config.Tests, toxenvsdjango52/quality) are unchanged, so branch protection keeps working.commitlint.yml), since they now decide the release version.make test,make quality), whereas on master tox ran the commands itself. This goes beyond the migration and is intentional.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 test(258 passed),make quality,python -m build). Repo-owner is encouraged to run the repo's feature tests before merging.🤖 Generated with Claude Code