feat: modernize repo to use uv and pyproject.toml (PEP 621/735) - #40
Closed
farhan wants to merge 4 commits into
Closed
feat: modernize repo to use uv and pyproject.toml (PEP 621/735)#40farhan wants to merge 4 commits into
farhan wants to merge 4 commits into
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the repository’s Python packaging, dependency management, linting, and CI/CD by migrating to pyproject.toml/PEP 621+735, adopting uv + tox-uv, switching linting to ruff, and adding automated releases via python-semantic-release.
Changes:
- Replaced legacy
setup.py/requirements*.in/*.txtworkflow withpyproject.tomldependency groups anduv.lock, plustox-uv-based tox environments. - Updated developer workflows (
Makefile,tox.ini) and CI (.github/workflows/ci.yml) to run viauvand ruff. - Added release automation (
.github/workflows/release.yml) and basic Sphinx docs scaffolding underdocs/.
Reviewed changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.ini | New tox configuration using tox-uv runners and dependency groups. |
| tests/test_schema.py | Formatting-only updates (parametrize layout, import style). |
| setup.py | Removed legacy setuptools packaging script. |
| setup.cfg | Removed legacy isort/pycodestyle/wheel config. |
| requirements/test.txt | Removed pip-compile generated pins for tests. |
| requirements/test.in | Removed pip-compile input for tests. |
| requirements/quality.txt | Removed pip-compile generated pins for quality tooling. |
| requirements/quality.in | Removed pip-compile input for quality tooling. |
| requirements/private.readme | Removed pip-sync private requirements guidance (pip-tools era). |
| requirements/pip.txt | Removed pip-compile generated pins for pip/setuptools/wheel. |
| requirements/pip.in | Removed pip-compile input for pip/setuptools/wheel. |
| requirements/pip-tools.txt | Removed pip-compile generated pins for pip-tools. |
| requirements/pip-tools.in | Removed pip-compile input for pip-tools. |
| requirements/doc.txt | Removed pip-compile generated pins for docs tooling. |
| requirements/doc.in | Removed pip-compile input for docs tooling. |
| requirements/dev.txt | Removed pip-compile generated pins for dev tooling. |
| requirements/dev.in | Removed pip-compile input for dev tooling. |
| requirements/constraints.txt | Removed legacy constraints indirection. |
| requirements/common_constraints.txt | Removed shared pip constraints file (pip-tools era). |
| requirements/ci.txt | Removed pip-compile generated pins for CI tooling. |
| requirements/ci.in | Removed pip-compile input for CI tooling. |
| requirements/base.txt | Removed pip-compile generated pins for base deps. |
| requirements/base.in | Removed pip-compile input for base deps. |
| repo_tools_data_schema/repo_tools_data_schema.py | Small refactors/formatting and improved assertion raising. |
| repo_tools_data_schema/init.py | Formatting + re-export pattern changes (currently introduces issues; see comments). |
| pyproject.toml | New canonical project metadata, dependency groups, ruff/pytest/coverage config, setuptools-scm, semantic-release config. |
| pylintrc_tweaks | Removed pylint configuration tweaks (moving off pylint). |
| pylintrc | Removed generated pylint configuration (moving off pylint). |
| MANIFEST.in | Removed explicit manifest (setuptools config now in pyproject.toml). |
| Makefile | Reworked dev commands around uv, tox, and ruff. |
| docs/Makefile | Added minimal Sphinx Makefile for docs builds. |
| docs/index.rst | Added initial Sphinx index page. |
| docs/conf.py | Added Sphinx configuration. |
| .github/workflows/release.yml | Added release workflow with semantic-release + PyPI publish. |
| .github/workflows/ci.yml | Added CI workflow using setup-uv and uv run tox. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Consolidated package metadata into pyproject.toml (PEP 621/735), replacing setup.py and setup.cfg - Switched dependency management from pip-compile to uv with PEP 735 dependency groups and uv.lock - Added python-semantic-release for automated versioning and PyPI publishing via OIDC - Replaced pylint/isort/pycodestyle with ruff; coverage config moved into pyproject.toml - Updated CI with ci.yml using astral-sh/setup-uv and uv run tox; added release.yml for automated releases - Deleted legacy files: setup.py, setup.cfg, MANIFEST.in, pylintrc, pylintrc_tweaks, requirements/ Closes openedx/public-engineering#506 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
farhan
force-pushed
the
farhan/modernize-repo
branch
from
July 10, 2026 11:37
2a8c1df to
90a294e
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
farhan
marked this pull request as ready for review
July 10, 2026 11:53
Add [tool.edx_lint].uv_constraints = [] and run edx_lint write_uv_constraints to populate [tool.uv].constraint-dependencies with the common edx-lint constraints (Django<6.0, elasticsearch<7.14.0). Regenerate uv.lock to reflect the applied constraints. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove setuptools-scm (PyPI-repo pattern) and replace with a static version = "2.0" field in [project], matching master's __version__. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Closing on account of #41 |
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
openedx-webhooks-data-schemato uv + pyproject.toml (PEP 621/735).Part of openedx/public-engineering#506.
setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata)uvwith PEP 735 dependency groups; commituv.lockruff(check + format); coverage config moved intopyproject.tomltox.inito usetox-uvwithuv-venv-lock-runnerastral-sh/setup-uv; SHA-pin all actions; addworkflow_calltriggerrequires-python = ">=3.12"Removed
Deleted files:
setup.py,setup.cfg,CHANGELOG.rst,pylintrc,pylintrc_tweaks,requirements/Removed Makefile targets:
qualitylint(ruff check) andformat(ruff format + ruff check --fix) targetsNot included
release.yml/python-semantic-release— master had no PyPI publish workflow, so automated releasing was not added.Python 3.11 dropped
Python 3.11 reached end-of-life on 2026-10-31 and Open edX dropped it platform-wide. Removed from the tox envlist, CI matrix, and classifiers.
Versioning
[Static]
version = "2.0"declared directly inpyproject.toml—setuptools-scmis not used and the version is bumped manually on each release tag.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 lint,make test,python -m build). Repo-owner is encouraged to run the repo's feature tests before merging.Code reviewer notes:
upgradetarget is kept but reimplemented: it now callsedx_lint write_uv_constraintsto regenerate uv constraints inpyproject.toml, then runsuv lock --upgrade— the old pip-compile workflow is gone..coveragercfile existed onmain; coverage config is now inline inpyproject.tomlunder[tool.coverage].CHANGELOG.rstis deleted — semantic-release was not added (see "Not included"), so changelog generation is deferred to a future step if/when the repo opts into PyPI publishing.pyproject.tomldependency groups anduv.lockto ensure all previously pinned transitive dependencies are still captured correctly, particularly theedx-lintconstraint injection viawrite_uv_constraints.🤖 Generated with Claude Code
The non-ruff modernization work has been extracted into a focused PR per the decision in the main story (public-engineering#506):
This PR retains the ruff adoption and can be rebased onto
farhan/modernize-python-repoonce that lands, to serve as the ruff epic PR.