Skip to content

build: modernize openedx-webhooks to use uv and pyproject.toml#440

Open
farhan wants to merge 4 commits into
openedx:masterfrom
farhan:farhan/modernize-python-repos
Open

build: modernize openedx-webhooks to use uv and pyproject.toml#440
farhan wants to merge 4 commits into
openedx:masterfrom
farhan:farhan/modernize-python-repos

Conversation

@farhan

@farhan farhan commented Jul 24, 2026

Copy link
Copy Markdown

Important

PR implemented with the assistance of Claude Code. Refined and validated before being submitted for code review.

Modernize `openedx-webhooks`
Part of openedx/public-engineering#506

Summary

  • Replace `setup.py`/`setup.cfg` with `pyproject.toml` (PEP 621 static metadata)
  • Switch from pip-compile to `uv` with PEP 735 dependency groups; commit `uv.lock`
  • Retain pylint/isort/mypy as on master
  • Coverage config moved into `pyproject.toml`
  • Update CI to use `astral-sh/setup-uv`; SHA-pin all actions; split into separate `run_tests` (produces "Tests (ubuntu-latest, 3.12)" check) and `quality_and_docs` jobs

Removed/Updated

Deleted files: `setup.py`, `setup.cfg`, `requirements/`, `.coveragerc`

Removed Makefile targets:

Target Reason
`compile-requirements` Replaced by `uv lock --upgrade` in the `upgrade` target
`pip-compile` Replaced by `uv lock`
`pip-compile-upgrade` Replaced by `uv lock --upgrade`

Updated Makefile targets:

Target Change
`upgrade` Now runs `edx_lint write_uv_constraints` + `uv lock --upgrade` instead of `pip-compile`
`upgrade-package` Now runs `uv lock --upgrade-package $(package)` instead of `pip-compile`
`install-dev-requirements` Now runs `uv sync --group dev` + `uv tool install tox --with tox-uv` instead of `pip-sync`
`pylint` Removed `setup.py` argument — it was the only root-level `.py` file and is now deleted
`check-pyproject.toml` Renamed from `check-setup.py`; validates `pyproject.toml` via `tomllib` instead of running `python setup.py check`

Versioning

Static: `version = "0.1.0"` declared directly in `pyproject.toml` — this repo does not publish to PyPI, so `setuptools-scm` is not used and the version is bumped manually on each release tag.

Important Notes

  • This repo does not publish to PyPI, so `python-semantic-release` and `release.yml` were not added.
  • `src/` layout was not adopted — this repo does not publish to PyPI, so the flat layout is retained.

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 install-dev-requirements`, `uv run tox -e py`, `uv run tox -e quality`, `uv run tox -e docs`). Repo-owner is encouraged to run the repo's feature tests before merging.


🤖 Generated with Claude Code

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.79%. Comparing base (2922109) to head (7f73673).

Files with missing lines Patch % Lines
openedx_webhooks/__init__.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
- Coverage   89.84%   89.79%   -0.06%     
==========================================
  Files          38       38              
  Lines        3103     3107       +4     
  Branches      239      239              
==========================================
+ Hits         2788     2790       +2     
- Misses        281      283       +2     
  Partials       34       34              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@farhan
farhan force-pushed the farhan/modernize-python-repos branch 2 times, most recently from 123b6d8 to 735e6cb Compare July 27, 2026 08:50
- Replace setup.py/setup.cfg with pyproject.toml (PEP 621 static metadata)
- Switch from pip-compile to uv with PEP 735 dependency groups; commit uv.lock
- Move coverage config into pyproject.toml; delete .coveragerc
- Update CI to use astral-sh/setup-uv; SHA-pin all actions; separate quality/docs/test envs
- Mirror dev dependency group to include test group (matching dev.in -> test.in pattern)
- Remove doc group from test deps to avoid inflating the test environment
- Fix importlib.metadata import to appear in stdlib block (isort ordering)
- Delete stale requirements.txt referencing removed requirements/ directory

Part of openedx/public-engineering#506
@farhan
farhan force-pushed the farhan/modernize-python-repos branch from 735e6cb to d6b0f5c Compare July 27, 2026 08:52
farhan and others added 3 commits July 27, 2026 14:04
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@farhan farhan self-assigned this Jul 27, 2026
@farhan
farhan marked this pull request as ready for review July 27, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant