Repository navigation
feat: modernize Python tooling (pyproject.toml + uv + semantic-release) - #283
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]>
… edx-lint 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]>
|
|
||
| [tool.semantic_release] | ||
| # Explicitly set the tag format (same as default). | ||
| tag_format = "v{version}" |
There was a problem hiding this comment.
We do not need to set the version format explicitly.
There was a problem hiding this comment.
I'd keep it. Every merged migration sets it explicitly with this comment, which is the wording feanil asked for.
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]>
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]>
# Conflicts: # .github/workflows/ci.yml # .github/workflows/pypi-publish.yml
| @@ -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.
| # | ||
| # ------------------------------ | ||
| # Generated by edx-lint version: 5.6.0 | ||
| # Generated by edx-lint version: 6.2.0 |
There was a problem hiding this comment.
7e3243c took the lock back to edx-lint 6.1.0 but this file is still the 6.2.0 output, so the [PII] section is config for a checker that isn't installed and the description still says the lock upgrades edx-lint to 6.2.0. Which version did you mean to land? If it's 6.1.0 then regenerate this file with it and update the description.
There was a problem hiding this comment.
6.1.0, master's pin. Regenerated pylintrc with it in 713e4b7 and fixed the description.
|
|
||
| #. Setup dev environment (since virtual environments are recommended for python development, here is an example of using | ||
| virtualenv. Other tools would work as well). By default, edx containers come with virtualenv preinstalled :: | ||
| #. Setup dev environment. ``make requirements`` uses `uv <https://docs.astral.sh/uv/>`_ to create a ``.venv`` |
There was a problem hiding this comment.
nit: On a merge-commit repo every commit here is a line in the 5.1.0 release notes, so be494c5 shows up under Bug Fixes as "address review feedback" and 7e3243c as a fix when it's a build change. Re-type them as a docs: and a build: commit with subjects that say what changed, eg. docs: describe the uv .venv setup and drop the manual release steps.
…dx-lint 6.1.0 Resolve uv.lock from the versions pinned in requirements/*.txt on master so this migration doesn't change what gets installed, which keeps edx-lint at master's 6.1.0. Regenerate pylintrc with that version so it no longer configures the 6.2.0 PII checker. Upgrades come in with the first make upgrade after this merges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Replace the virtualenv setup in README.rst and the docs with the uv .venv flow. - Remove the manual release steps from the PR template. 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. The README CI badge now points at release.yml, since ci.yml no longer runs on master. Co-Authored-By: Claude Opus 5.5 <[email protected]>
8af5d87 to
8da6249
Compare
Summary
Moves super-csv from setup.py/pip-tools to pyproject.toml, uv and python-semantic-release.
Part of openedx/public-engineering#512 (parent openedx/public-engineering#506).
setup.py/setup.cfg/.coveragercintopyproject.toml. The version now comes from setuptools-scm, and__version__anddocs/conf.pyread it throughimportlib.metadata.requirements/replaced by dependency groups anduv.lock. The old tox factors carry over:django52maps totest, andcelery53anddrflatestget their own groups, so CI still runsdjango52-celery53-drflatest. The repo-specificcelery>=5.2.2,<6.0.0pin moved to[tool.edx_lint].uv_constraints.tox-uv(uv-venv-lock-runner). CI installs withastral-sh/setup-uv, runsuv sync --locked --group cianduv run --locked tox, and gains aworkflow_calltrigger. The job name and matrix are unchanged.pypi-publish.yml(token-based) replaced byrelease.yml, copied from sample-plugin. It uses PSR withchangelog: "false", creates the GitHub release withgh release create, and publishes to PyPI with OIDC.src/super_csv, with the tox, Makefile, docs,.tx/config,test_settings.py,MANIFEST.inand README paths updated to match.Before merging
super-csv: repositoryopenedx/super-csv, workflowrelease.yml.v5.0.0, already matches PyPI 5.0.0.tag_format = "v{version}"is set explicitly, the same as python-semantic-release's default.Testing
uv run --locked tox -e django52-celery53-drflatest,quality,docs,pii_checkpasses locally: 21 tests, the same count as master, and coverage is unchanged at 85%.uv lock --checkpasses.Requires-Distis identical. The intended metadata changes are:License-Expression: Apache-2.0replaces the license classifier.Requires-Python: >=3.12is added.py3instead ofpy2.py3.twine checkpasses on both dists. The sdist still ships CHANGELOG.rst, README.rst and LICENSE.txt.Reviewer notes
uv.lockis seeded with master'srequirements/*.txtpins instead of a fresh resolve, so nothing that gets installed changes, edx-lint included (6.1.0).pylintrcis regenerated with that edx-lint 6.1.0 (edx_lint write pylintrc); master's copy was generated by 5.6.0.🤖 Generated with Claude Code