Repository navigation
build: modernize packaging with uv, pyproject.toml and semantic-release - #486
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #486 +/- ##
=============================
=============================
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Also, Since |
|
Fixed in f9f2152. |
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. Here it also makes make docs build and twine-check a dist.
7364286 to
2c2b09a
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). uv.lock is seeded from master's requirements/*.txt pins so the switch is like-for-like; upgrades are left to the first `make upgrade`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2c2b09a to
90e703e
Compare
Important
PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.
Modernize
django-config-modelsPart of openedx/public-engineering#506
Summary
django-config-models.src/layout.setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata).uvwith PEP 735 dependency groups; commituv.lock..coveragercand the tox[pytest]config intopyproject.toml.astral-sh/setup-uv; SHA-pin all actions; setci.ymltokenpermissions: contents: read.python-semantic-release+release.yml(OIDC trusted publishing), replacingpublish_pypi.yml.Removed/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,.github/workflows/publish_pypi.ymlRemoved Makefile targets:
compile-requirementsuv lockUpdated Makefile targets:
requirementsuv sync --locked --group devinstead of pip-sync;devincludesdocsomake docsworks after itupgradeedx_lint write_uv_constraints+uv lock --upgradeinstead of pip-compilequalitytox -e quality); tox now calls this targetdocstox -e docs); tox now calls this targettestDJANGO_SETTINGS_MODULEand addsmock_appstoPYTHONPATHso it works outside tox; tox now calls this targetdummy_translationssrc/layoutVersioning
setuptools-scmwithdynamic = ["version"]— master had a PyPI publish workflow;python-semantic-releasecontrols the version string at release time via git tags.Important Notes
licenseis set toAGPL-3.0-or-laterfrom master'sGNU Affero General Public License v3 or later (AGPLv3+)classifier (setup.pyalso hadlicense="AGPL 3.0").quality,docs,django52-drflatest,check_keywords) are unchanged so branch-protection check names stay the same.CHANGELOG.rstis kept with a deprecation note and still ships in the sdist, as on master; release notes now live on GitHub Releases.uv.lockis seeded from master'srequirements/*.txtpins, so dependency versions match master; upgrades are left to the firstmake upgrade.release.yml, sinceci.ymlno longer runs on pushes tomaster.[tool.semantic_release]setstag_format = "v{version}"(matches existing tags such asv3.0.0),major_on_zero = falseandallow_zero_version = trueexplicitly, so releases don't depend on PSR defaults.commitlint.ymlalready existed, so conventional commit format is enforced and now also drives releases (fix:→ patch,feat:→ minor).make test,make quality,make docs,make check_keywords), whereas on master tox ran the commands itself. This goes beyond the migration and is intentional. Runningmake docslocally now also builds the dist and runstwine check, which master only did insidetox -e docs.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,make docs,python -m build). Repo-owner is encouraged to run the repo's feature tests before merging.🤖 Generated with Claude Code