Skip to content

build: modernize repo-tools-data-schema to use uv and pyproject.toml - #42

Open
farhan wants to merge 7 commits into
openedx:mainfrom
farhan:farhan/modernize-python-repos
Open

build: modernize repo-tools-data-schema to use uv and pyproject.toml#42
farhan wants to merge 7 commits into
openedx:mainfrom
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-data-schema`
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/pycodestyle as on master
  • Add CI workflow using `astral-sh/setup-uv`; SHA-pin all actions
  • Set `requires-python = ">=3.12"` (first explicit Python version requirement for this repo)

Removed/Updated

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

Updated Makefile targets:

Target Change
`upgrade` Was pip-compile based; now runs `edx_lint write_uv_constraints` + `uv lock --upgrade`
`requirements` Now runs `uv sync --group dev` + `uv tool install tox --with tox-uv`
`docs` New target added to validate RST files via `doc8`

Versioning

`version = "2.0"` declared directly in `pyproject.toml` — master had no PyPI publish workflow, 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 `src/` layout was not adopted.
  • `release.yml` was not added because this repo has no PyPI publish workflow on master.

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`). Repo-owner is encouraged to run the repo's feature tests before merging.


🤖 Generated with Claude Code

farhan and others added 4 commits July 24, 2026 16:09
- Migrate from setup.py/setup.cfg to pyproject.toml (PEP 621)
- Switch from pip-compile to uv with PEP 735 dependency groups
- Update CI to use astral-sh/setup-uv
- Drop Python <3.12 support
- Commit uv.lock
- No src/ layout or release.yml (non-PyPI repo)

Part of openedx/public-engineering#520

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@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.
⚠️ Please upload report for BASE (main@b0a346f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
repo_tools_data_schema/__init__.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #42   +/-   ##
=======================================
  Coverage        ?   35.59%           
=======================================
  Files           ?        2           
  Lines           ?       59           
  Branches        ?        0           
=======================================
  Hits            ?       21           
  Misses          ?       38           
  Partials        ?        0           
Flag Coverage Δ
unittests 35.59% <60.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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 and others added 3 commits July 24, 2026 17:01
- Use quality/py312 as standard tox env names (not lint/py)
- Restore quality as the primary Makefile linting target; drop the
  introduced lint target which had no master equivalent
- Remove doc dependency group and testenv:docs — repo has no docs
  infrastructure on master
- Fix __init__.py import ordering so relative import is at the top
  alongside other imports, removing the pylint disable comment
- Update ci.yml Codecov condition to match py312 toxenv name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- tox.ini envlist: py312 -> py
- ci.yml toxenv matrix: py312 -> py
- Codecov upload condition: compound check on both toxenv and
  python-version to pin the exact job

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@farhan farhan self-assigned this Jul 24, 2026
@farhan farhan moved this to 👀 In review in Aximprovements Team Jul 24, 2026
@farhan
farhan marked this pull request as ready for review July 24, 2026 13:21
@farhan farhan removed the status in Aximprovements Team Jul 24, 2026
@farhan farhan moved this to 👀 In review in Aximprovements Team Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

1 participant