build: modernize openedx-webhooks to use uv and pyproject.toml - #440
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #440 +/- ##
=======================================
Coverage 89.84% 89.85%
=======================================
Files 38 38
Lines 3103 3105 +2
Branches 239 239
=======================================
+ Hits 2788 2790 +2
Misses 281 281
Partials 34 34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
735e6cb to
d6b0f5c
Compare
7df6cdb to
3636534
Compare
|
Two more findings that aren't attachable as inline comments since the files aren't part of this diff:
(Everything else checked out — changelog handling correctly N/A here since this repo uses |
|
Thanks for the thorough review — all three points addressed in bd9a5ac.
|
irfanuddinahmad
left a comment
There was a problem hiding this comment.
Two findings from a fresh pass over the current diff (verified against the actual head commit and live CI checks, not just inspection).
irfanuddinahmad
left a comment
There was a problem hiding this comment.
All findings from both review passes addressed in bd9a5ac: dead uv tool install tox dropped, the uncovered except branch pragma'd, unused isort dep resolved, Dockerfile fixed to install uv and stop copying the deleted requirements/ dir, and the upgrade-python-requirements.yml/openedx/.github ADD_PATHS gap called out as a known limitation. LGTM.
ecfe812 to
83616fa
Compare
d9a23ec to
c9b4b9c
Compare
|
@feanil PR is ready review/merge |
- 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 - Update .readthedocs.yaml to use uv instead of deleted requirements/dev.txt - Drop uv tool install tox anti-pattern; fix Dockerfile for requirements removal - Add pragma: no cover to unreachable except branch in __init__.py - Drop unused isort dependency Part of openedx/public-engineering#506 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
c9b4b9c to
c05f5bb
Compare
feanil
left a comment
There was a problem hiding this comment.
generally looks good, I made a small style fix and ran the make upgrade.
| - ubuntu-latest | ||
| python-version: | ||
| - "3.12" | ||
| os: [ubuntu-latest] |
There was a problem hiding this comment.
nit: This is an un-necessary change and makes it more annoying to add new versions to a list by just adding a new line, rather than editing an existing line. The diff is easier to read when just adding a new line.
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
Removed/Updated
Deleted files: `setup.py`, `setup.cfg`, `requirements/`, `.coveragerc`
Removed Makefile targets:
Updated Makefile targets:
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
Dependency Upgrade Workflow
The existing `upgrade-python-requirements.yml` calls `openedx/.github`'s reusable workflow, which hardcodes `ADD_PATHS="requirements"` — but that only affects the fork-friendly path (Path B, `peter-evans/create-pull-request`). Since this repo has `REQUIREMENTS_BOT_GITHUB_TOKEN` configured, the workflow takes Path A (`pull_request_creator`), which discovers changed files from the git diff directly and ignores `ADD_PATHS` entirely. `openedx/XBlock` is already on this same uv-based setup and its weekly upgrade workflow runs successfully, picking up `uv.lock` changes without any issues — confirming this repo will behave identically after merge.
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