Repository navigation
build: modernize django-require to uv + pyproject.toml - #19
Conversation
|
Master tests 3.11 and 3.12, and nothing here needs 3.11 dropped. Could we keep Since |
|
Fixed in bc1a459. |
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.
Before merge: a PyPI trusted publisher is needed for release.yml, and both commits are build:, so a squash as build: won't release anything.
Moves packaging to static PEP 621 metadata with setuptools-scm, uv dependency groups with a committed uv.lock, and python-semantic-release with OIDC publishing, per public-engineering#506, so releases come from conventional commits instead of manual version bumps. Python 3.11 support is kept; dropping it belongs in its own PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
de3ea8c to
7b38914
Compare
Declare both licenses since post-fork code is Apache-2.0 while upstream remains BSD-3-Clause, and use a plain 0.0.0 setuptools-scm fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Important
PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.
Modernize
django-requirePart of openedx/public-engineering#506
Summary
openedx-django-require.src/layout.setup.pywithpyproject.toml(PEP 621 static metadata).uvwith PEP 735 dependency groups; commituv.lock..coveragercintopyproject.toml.astral-sh/setup-uv; SHA-pin all actions; giveci.ymlread-onlypermissions: contents: read.python-semantic-release+release.yml(OIDC trusted publishing), replacing the token-basedpypi-release.yml.Removed/Updated
Deleted files:
setup.py,.coveragerc,.github/workflows/pypi-release.ymlAdded Makefile: master had no Makefile, so a minimal one is added.
requirementsuv sync --locked --group devtesttoxupgradeedx_lint write_uv_constraints+uv lock --upgrade; called byupgrade-python-requirements.yml, which had nomake upgradeto run on masterVersioning
setuptools-scmwithdynamic = ["version"].python-semantic-releasesets the version from git tags at release time;[tool.semantic_release]setstag_format = "v{version}"(matches latest tagv3.0.0),major_on_zero = falseandallow_zero_version = trueexplicitly instead of relying on PSR defaults.Important Notes
require.__version__changes from the tuple(3, 0, 0)to the string fromimportlib.metadata.version("openedx-django-require").qualityordocstox env/CI job is added, because master has no linters and no docs to run.toxno longer useschangedir = {envtmpdir}; thesrc/layout already makes tests import the installed package.CHANGELOG.mdgets a deprecation note and stays out of the sdist, as on master.ci.ymldrops itspush:trigger, sincerelease.ymlruns it on pushes tomasterviaworkflow_call.requires-python = ">=3.11", tox envlist, CI matrix) as on master; dropping it is left to its own PR.Tests (ubuntu-latest, 3.11/3.12, django42)) are unchanged.release.yml, sinceci.ymlno longer runs on pushes tomaster.Caution
setup.pydeclaredlicense = "BSD", so[project].licenseis"BSD-3-Clause". The README says contributions after the fork are under Apache-2.0 (LICENSE), and both license files still ship in the wheel. Please verify the license: if it should cover both, change it to"Apache-2.0 AND BSD-3-Clause"before merging.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,uv run tox,python -m build). The built wheel's file list is identical to master's. Locally,testCollectStaticNoBuildProfilefails the same way on master and on this branch (no Java runtime on the test machine).🤖 Generated with Claude Code