Repository navigation
build: modernize edx-ace repo to uv + pyproject.toml - #381
Conversation
|
Smaller things:
|
|
Fixed in da3ad76. |
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.
Nit: docs/testing.rst still has the virtualenv wording; make it make requirements then source .venv/bin/activate.
Move packaging to static PEP 621 metadata with setuptools-scm, manage dependencies with uv dependency groups and a committed uv.lock, adopt the src/ layout, and release via python-semantic-release with OIDC trusted publishing, per public-engineering#506. The lock is seeded from master's requirements pins so dependency upgrades land separately via `make upgrade`, not hidden in this change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
b61cfef to
4f09c82
Compare
Use a plain 0.0.0 fallback so int-tuple version parsing works, lock uv in CI so the lockfile is never rewritten, let the Makefile assume an activated env, regenerate pylintrc with current edx-lint, and drop the legacy openedx.yaml. 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
edx-acePart of openedx/public-engineering#506
Summary
edx-ace.src/layout.setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata);extras_requireis ported to[project.optional-dependencies].uvwith PEP 735 dependency groups; commituv.lock..coveragercandpytest.iniconfig intopyproject.toml.astral-sh/setup-uvinstead ofactions/setup-python+ pip, with read-onlypermissions: contents: readsincerelease.ymlnow calls it.python-semantic-release+release.yml(OIDC trusted publishing), replacing the token-basedpypi-publish.yml..readthedocs.yamlso Read the Docs installs thedocgroup fromuv.lock(therequirements/doc.txtit could rely on is deleted).Removed/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,pytest.ini,.github/workflows/pypi-publish.ymlUpdated Makefile targets:
requirementsuv sync --locked --group devinstead ofpip-sync.upgradeedx_lint write_uv_constraints+uv lock --upgradeinstead of pip-compile.qualitytox -e quality);setup.pydropped from the isort file list since it was deleted.docstox -e docs); builds withpython -m buildinstead ofsetup.py sdist bdist_wheel.testpython -Wd -m pytest $(PYTEST_ARGS), keeping master's-Wdand tox{posargs}.write-pylintrcuv run --with edx-lint edx_lint write pylintrc, sincepip installisn't available in the uv venv.extract_translations,compile_translations,detect_changed_source_translations,dummy_translationssrc/edx_ace.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}"(matching existingv1.x.ytags),major_on_zero = falseandallow_zero_version = trueexplicitly instead of relying on tool defaults.Important Notes
commitlint.ymlalready exists, but withpython-semantic-releasethe commit type now decides the release (fix:→ patch,feat:→ minor,!→ major).Testsjob name, the sameos/python-version/toxenvmatrix andfail-fast: false, so branch-protection check names do not change.uv.lockis seeded from master'srequirements/*.txtpins, so dependency versions match master; upgrades are left to the firstmake upgrade. This keepshypothesisat 6.104.2; newer releases find a pre-existing flaky case intest_message.py::test_serialization_roundtrip.release.yml(ci.ymlno longer runs on pushes tomaster), and the "Publish package to PyPi" badge for the deletedpypi-publish.ymlis dropped.CHANGELOG.rstas master did, and the changelog now carries a deprecation note pointing to GitHub Releases.make test,make quality,make docs), 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 test,make quality,make docs,python -m build). Repo-owner is encouraged to run the repo's feature tests before merging.🤖 Generated with Claude Code