Repository navigation
feat: modernize Python tooling (pyproject.toml + uv + semantic-release) - #429
irfanuddinahmad wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the pull request, @irfanuddinahmad! This repository is currently unmaintained. 🔘 Find a technical reviewerTo get help with finding a technical reviewer, reach out to the community contributions project manager for this PR:
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| [tool.semantic_release] | ||
| # Explicitly set the tag format (same as default). | ||
| tag_format = "v{version}" |
There was a problem hiding this comment.
We don't need to mention the tag_format
Summary
Moves edx-celeryutils from setup.py and pip-tools to pyproject.toml, uv and python-semantic-release.
Part of openedx/public-engineering#512 (parent openedx/public-engineering#506).
pyproject.toml(PEP 621). The version comes from git tags via setuptools-scm, and__version__reads it throughimportlib.metadata.setup.py,setup.cfgand.coveragercare removed, and their isort and coverage settings move intopyproject.tomlunchanged.requirements/,uv.lockis committed, andmake upgraderegenerates the constraints withedx_lint write_uv_constraints.tox-uvwith theuv-venv-lock-runner. CI installs withastral-sh/setup-uvand runsuv sync --locked --group cianduv run --locked tox. The job names (tests (ubuntu-latest, 3.12, <toxenv>)) are the same as before.release.yml(copied from openedx/sample-plugin) publishes to PyPI through trusted publishing. It replaces the token-basedpublish_pypi.yml.src/layout.Before merging
edx-celeryutils: repositoryopenedx/edx-celeryutils, workflowrelease.yml.The latest tag,
v2.0.0, matches the latest PyPI release (2.0.0), so python-semantic-release's defaultv{version}tag format works without an override.Testing
uv run --locked tox -e quality,docs,django42,django52passes locally: 16 tests on Django 4.2.30 and 5.2.18 (same count as master's CI), quality is clean, the docs build succeeds andtwine checkpasses.uv lock --checkis clean.celery_utils/management/commands/tests/no longer ship. Requires-Dist is unchanged (Django,celery<6.0,django-model-utils,jsonfield). The sdist still includesCHANGELOG.rst,README.rst,LICENSE.txtandAUTHORS.Reviewer notes
py{312}-celery{53}-django{42,52}, but CI only ever randjango42anddjango52, and those always got the latest celery allowed bycelery<6.0. Thecelery53envs only ran locally, from a hand-maintainedrequirements/celery53.txtthatmake upgradenever refreshed. A second celery pin can't be expressed as a uv dependency group alongside the Django matrix without a much larger conflict matrix, so I dropped thecelery53factor and kept the envs CI runs.include-package-data = false: the oldinclude_package_data=Trueonly mattered becauseMANIFEST.inpulled in every*pyfile, which is how the management-command tests ended up in the wheel. The package has no non-Python data files, so the wheel is otherwise identical.py2.py3topy3becausesetup.cfg's[wheel] universal = 1is gone.docs/conf.pyhadversion/releasehard-coded to0.1.0since the docs were created, while the package is at 2.0.0. It now reads the version from package metadata, like__version__and the other repos'conf.py, so the docs show 2.0.0 and follow the tags from here on.🤖 Generated with Claude Code