Repository navigation
build: modernize django-pyfs to uv + pyproject.toml - #316
Conversation
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.
Keeping plain uv run tox, as in sample-plugin: the preceding uv sync --locked --group ci step already fails on a stale uv.lock, so --locked on uv run is redundant.
52c9199 to
9fbca36
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #316 +/- ##
=============================
=============================
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move packaging to static PEP 621 metadata with setuptools-scm, manage dependencies with uv and PEP 735 groups, and release via python-semantic-release with OIDC publishing, per openedx/public-engineering#506. Co-Authored-By: Claude Opus 5.5 <[email protected]>
setuptools-scm adds every tracked file to the sdist, so the deprecated CHANGELOG.rst started shipping in it; 4.0.0's sdist did not include it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Carries over the certifi upgrade that landed on master in the deleted requirements files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
9fbca36 to
72e31d9
Compare
Important
PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.
Modernize
django-pyfsPart of openedx/public-engineering#506
Summary
openedx-django-pyfs.src/layout (src/djpyfs).setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata); the built wheel has the same file list andRequires-Distas the 4.0.0 wheel on PyPI.uvwith PEP 735 dependency groups (test-base,test,django42,quality,ci,dev); commituv.lock.qualitygroup) as on master..coveragercandpytest.iniconfig intopyproject.toml.astral-sh/setup-uv,uv sync --locked --group cianduv run tox; all actions SHA-pinned.python-semantic-release+release.yml(OIDC trusted publishing), replacingpypi-publish.yml.Removed/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,pytest.ini,.github/workflows/pypi-publish.ymlRemoved Makefile targets:
$(COMMON_CONSTRAINTS_TXT)requirements/common_constraints.txtfor pip-compile; edx-lint'swrite_uv_constraintsnow merges common constraints into[tool.uv].constraint-dependencies.Updated Makefile targets:
requirementsuv sync --locked --group devinstead of pip/pip-sync.qualitypylint,isort --check-only,python -m buildandtwine checkdirectly onsrc/djpyfsinstead oftox -e quality.upgradeedx_lint write_uv_constraints+uv lock --upgradeinstead of pip-compile.Versioning
setuptools-scmwithdynamic = ["version"]— master had a PyPI publish workflow;python-semantic-releasecontrols the version string at release time via git tags (baseline tagv4.0.0already exists).Important Notes
docstox env/CI job was added: the repo has nodocs/directory, Sphinx config or docs make target.moto<5.0.0andsetuptools<82moved fromconstraints.txtinto[tool.edx_lint].uv_constraintswith their original reasons.include-package-data = falsekeeps wheel parity with master:djpyfs/static/index.htmlwas never shipped in the wheel.Framework :: Django :: 5.1and the License classifier were dropped (5.1 is not tested; the license is now the SPDXlicense = "Apache-2.0").Out of Scope
htmlcov/index.htmlfrom thedjango42job, as on master.coverage.xmlfrom the newest Django job if desired.pycodestyle/pydocstylequalitygroup (asquality.indid) but never run on master; config preserved (tox.ini [pycodestyle],[tool.pydocstyle]).make quality.example/appTesting 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,tox -e django42,django52,quality,python -m build). Repo-owner is encouraged to run the repo's feature tests before merging.🤖 Generated with Claude Code