chore: modernize to uv + pyproject.toml + src/ layout + semantic-release - #237
Draft
farhan wants to merge 8 commits into
Draft
chore: modernize to uv + pyproject.toml + src/ layout + semantic-release#237farhan wants to merge 8 commits into
farhan wants to merge 8 commits into
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
3 tasks
farhan
marked this pull request as draft
July 17, 2026 16:36
- Replace setup.py/setup.cfg with pyproject.toml (PEP 621/setuptools-scm) - Switch from pip-compile to uv with PEP 735 dependency groups; commit uv.lock - Move package into src/ layout (git mv with history preserved) - Retain pylint/isort/pycodestyle/black/pydocstyle (ruff deferred per #506) - Update tox.ini to use tox-uv with uv-venv-lock-runner - Update CI to use astral-sh/setup-uv; add workflow_call trigger; SHA-pin actions - Add release.yml with python-semantic-release and OIDC trusted publishing - Delete pypi-publish.yml (replaced by release.yml) Part of openedx/public-engineering#506 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add relative_files = true to [tool.coverage.run] so the coverage XML uses relative paths; py-cov-action was failing because absolute paths from the tox venv did not match the workspace root on GitHub Actions. - Update .readthedocs.yaml to install from pyproject.toml + docs/requirements.txt instead of the deleted requirements/doc.txt. - Add docs/requirements.txt for RTD compatibility (RTD does not support PEP 735 dependency-groups natively). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- MANIFEST.in: remove redundant `include LICENSE` and `include README.rst` (pyproject.toml already declares these via license-files and readme) - pyproject.toml: add [project.optional-dependencies].docs for RTD - .readthedocs.yaml: replace requirements.txt step with extra_requirements - docs/requirements.txt: delete (superseded by optional-dependencies) - docs/conf.py: remove sys.path.insert for src/ (package is pip-installed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
farhan
force-pushed
the
farhan/modernize-python-repo
branch
from
July 22, 2026 08:40
58a105f to
993ecb2
Compare
farhan
marked this pull request as ready for review
July 22, 2026 08:49
- Regenerate uv.lock so `uv lock --check` passes (docs optional extra was added without relocking). - Use bare `setuptools` (no version pin) in [build-system].requires for parity across openedx repos; keep setuptools-scm>=8.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove `fail-fast: false` from the CI matrix strategy; main did not set it, so omit the key to keep parity (defaults to true) - Drop `requirements` from pytest `norecursedirs`; the directory no longer exists after the uv/pyproject migration Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bmtcril
reviewed
Jul 22, 2026
bmtcril
reviewed
Jul 22, 2026
bmtcril
reviewed
Jul 22, 2026
Contributor
There was a problem hiding this comment.
Just a couple of questions. Aspects CI (main) is testing this here: openedx/tutor-contrib-aspects#1293 (it will fail for now, since the Verawood changes aren't there yet)
And against Verawood: openedx/tutor-contrib-aspects#1294 (this is the real test)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
PR implemented with the assistance of Claude Code, human-reviewed and improved before pushing to code review.
Summary
Modernize
platform-plugin-aspectsto uv + pyproject.toml (PEP 621/735) + src/ layout + python-semantic-release.Part of openedx/public-engineering#506.
setup.py/setup.cfgwithpyproject.toml(PEP 621 with setuptools-scm for dynamic version)uvwith PEP 735 dependency groups; commituv.locksrc/layout (history preserved viagit mv)pyproject.tomltox.inito usetox-uvwithuv-venv-lock-runnerastral-sh/setup-uv; SHA-pin all actions; addworkflow_calltrigger; setfail-fast: falsepython-semantic-release+release.yml(OIDC trusted publishing)commitlint.ymlwas already present — conventional commit format already enforced on all PRsRemoved
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,.github/workflows/pypi-publish.yml(replaced byrelease.yml)Removed Makefile targets:
piptoolsuv syncinrequirementstargetVersioning
[Dynamic]
setuptools-scmwithdynamic = ["version"]— master had a PyPI publish workflow;python-semantic-releasecontrols the version string at release time via git tags. Latest tag isv2.0.0(1.x+), so no zero-version guard is needed.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,uv run tox -e py312-django52,python -m build). 109 tests pass at 97% coverage. Repo-owner is encouraged to run the repo's feature tests before merging.Code reviewer notes:
publish_to_pypijob uses OIDC (id-token: write) with no token; PyPI project → Publishing → Add a new publisher, pointing atopenedx/platform-plugin-aspects, workflowrelease.yml. The Axim team (Feanil) must confirm this is configured before merging, otherwise the first publish will fail silently after semantic-release has already tagged and bumped the version.matrix.toxenv == 'django42'(never matched —django42was not in the old matrix) tomatrix.toxenv == 'django52'; coverage comments will now actually post on PRs.GITHUB_TOKENis used inrelease.ymlfor semantic-release (instead of a dedicatedOPENEDX_SEMANTIC_RELEASE_GITHUB_TOKEN); if the org requires a PAT for pushing tags/commits back to the repo, switch to that secret.PYPI_UPLOAD_TOKENsecret can be removed from the repo settings after merge (out-of-band).🤖 Generated with Claude Code