Repository navigation
Modernize Python tooling (pyproject.toml, uv, python-semantic-release) - #328
salman2013 wants to merge 4 commits into
Conversation
Replace setup.py/setup.cfg/.coveragerc with a PEP 621 pyproject.toml, using setuptools-scm for the version and an SPDX license expression. The built wheel's file list matches the one built from setup.py. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Move requirements/*.in into PEP 735 dependency groups, lock them in uv.lock (seeded from the existing requirements/*.txt pins, so no versions change), and run tox and CI through tox-uv and setup-uv. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replace the tag-triggered pypi-publish.yml with release.yml, adapted from openedx/sample-plugin: merges to master are versioned from their conventional commits, released on GitHub with the dists attached, and published to PyPI through trusted publishing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks for the pull request, @salman2013! 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. |
- Run CI only on pull requests and from release.yml, so a merge to master doesn't run it twice; point the README badge at release.yml. - Exclude repo-only files from the sdist. - Let the Docker build pass the version to setuptools-scm. - Use uv pip and uv sync --locked in the Makefile. - Set authors and drop the dead [pytest] section from tox.ini. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Description
Migrates cc2olx from setup.py/pip-tools to
pyproject.toml, uv, and python-semantic-release, following openedx/sample-plugin. The package was already insrc/layout, so no code moves.Changes (one commit per step)
1. Metadata →
pyproject.toml(PEP 621)setup.py,setup.cfgand.coveragercwithpyproject.toml.__version__is kept and read throughimportlib.metadata.license = "AGPL-3.0-only", matching the old "AGPL v3" classifier (no "or later").include-package-data = false, withtemplates/**listed. Otherwise setuptools-scm would addtools/README.rstto the wheel.MANIFEST.innow hasprune test_data. Otherwise setuptools-scm would add the.imsccfixtures to the sdist (309 KB → 10 MB).:ref:role, which failstwine checkonmaster. PyPI rejects descriptions that don't render.CHANGELOG.rsthas a deprecation note; release notes are now on GitHub Releases.2. pip-tools → uv
requirements/is replaced by PEP 735 dependency groups anduv.lock.uv.lockwas seeded frommaster'srequirements/*.txtpins, so no installed versions change.make upgradetakes upgrades from here on.tox-uvwithuv-venv-lock-runner. CI usessetup-uvand--locked.3. python-semantic-release
release.ymlis adapted from sample-plugin's and replacespypi-publish.yml. Merges tomasterare versioned from conventional commits, released on GitHub with the dists attached, and published to PyPI via trusted publishing (OIDC).PYPI_UPLOAD_TOKENis no longer used.Maintainer actions needed before merge
v0.4.0tag. The existing tags are bare (0.4.0), and PSR usesv{version}. Without the tag, PSR computes 0.1.0 as the next release.cc2olx, repoopenedx/cc2olx, workflowrelease.yml. The package has never been published, because the 0.4.0pypi-publish.ymlrun failed.Ticket: Ticket: openedx/public-engineering#519
🤖 Generated with Claude Code