Repository navigation
feat: modernize Python tooling (pyproject.toml + uv + semantic-release) - #373
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the pull request, @irfanuddinahmad! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
…igrations Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep requirements/*.txt deleted; they are replaced by uv.lock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CHANGELOG.rst is no longer updated now that release notes go to GitHub Releases, so stop appending it to the long description and note that at the top of the file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep requirements/*.txt deleted; they are replaced by uv.lock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An RST comment doesn't render on GitHub, so state it as a normal paragraph under the heading, linking to GitHub Releases. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| @@ -0,0 +1,117 @@ | |||
| name: Semantic Release | |||
There was a problem hiding this comment.
.github/PULL_REQUEST_TEMPLATE.md still has "Version bumped" and "Changelog record added" in the merge checklist, and "Create a tag" and the PyPI check after merge. Those should come out of the template since PSR handles the version, tag and release now.
Resolve uv.lock from the versions pinned in requirements/*.txt on master so this migration doesn't change what gets installed. Upgrades come in with the first make upgrade after this merges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Remove the manual release steps from the PR template. - Replace the virtualenv setup in the docs with the uv .venv flow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
release.yml runs on every push to the default branch and calls ci.yml through run_ci, so the push trigger in ci.yml ran every merge's CI twice. This matches sample-plugin's ci.yml. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Moves edx-when off pip-tools/setup.py and onto pyproject.toml, uv and python-semantic-release, following openedx/sample-plugin.
Part of openedx/public-engineering#512 (parent openedx/public-engineering#506).
pyproject.toml(PEP 621,AGPL-3.0-or-laterto match the old classifier). The version comes from git tags via setuptools-scm, and__version__usesimportlib.metadata.setup.py,setup.cfgand.coveragercare removed.requirements/is replaced by dependency groups anduv.lock. Django caps live in[tool.uv].constraint-dependencies, written byedx_lint write_uv_constraints. The publishedRequires-Distis unchanged from 4.1.0.tox-uvwithuv-venv-lock-runner.make requirements/make upgradeuse uv.ci.ymlandmigrations-checker-postgresql.ymluseastral-sh/setup-uvanduv sync --locked/uv run --locked. The migrations check gets its DB drivers throughuv run --with mysqlclient --with psycopg2-binary.release.yml(python-semantic-release + PyPI trusted publishing) replaces the token-basedpypi-publish.yml.src/edx_when.Before merging
edx-whenwith repositoryopenedx/edx-when, workflowrelease.yml.The latest tag
v4.1.0matches the latest PyPI release (4.1.0), so PSR will pick up from there. master already hasfeat:commits since then, so the first run after merge will release 4.2.0.Testing
uv run --locked tox -e django42,django52,quality,docs,pii_checkpasses from a fresh clone (134 tests on both Django versions, same as before the migration).uv lock --checkis clean, and the migrations check passes against MySQL 8.0 and Postgres.templates/edx_schedule/base.html. The only difference is thatLICENSE.txt/AUTHORSnow sit under.dist-info/licenses/(PEP 639).Requires-Distand entry points are identical.twine checkpasses.Reviewer notes
pylintrcwas regenerated withedx_lint write pylintrc. The lock resolves edx-lint 6.2.0, and its new PII checker crashes pylint unlesspii-termsis configured.django52tox env used to installDjango<=5.2, which resolves to 5.2.0. It now uses thetestgroup (Django>=5.2,<6.0).ci.yml, thepip install mysqlclient psycopg2-binarylines are dropped. tox never passedDB_*through to the test env, so the tests have always run on SQLite. Thedbmatrix and job names are kept as they were.Django>=1.11is kept as-is so the published dependency stays the same as 4.1.0.🤖 Generated with Claude Code