Skip to content

Modernize xapi-db-load: migrate to uv, pyproject.toml, PEP 735 dependency groups#257

Closed
farhan wants to merge 2 commits into
openedx:mainfrom
farhan:farhan/modernize-python-repos
Closed

Modernize xapi-db-load: migrate to uv, pyproject.toml, PEP 735 dependency groups#257
farhan wants to merge 2 commits into
openedx:mainfrom
farhan:farhan/modernize-python-repos

Conversation

@farhan

@farhan farhan commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Important

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

Modernize `xapi-db-load`
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/pydocstyle/mypy as on master.
  • Coverage config moved into `pyproject.toml`
  • Update CI to use `astral-sh/setup-uv`; SHA-pin all actions

Removed/Updated

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

Updated Makefile targets:

Target Change
`upgrade` Replaced pip-compile workflow with `uv run edx_lint write_uv_constraints` + `uv lock --upgrade`
`requirements` Replaced pip-sync with `uv sync --group dev` + `uv tool install tox --with tox-uv`
`quality` Replaced `python setup.py bdist_wheel` with `uv run python -m build`

Versioning

`version = "3.1.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.
  • This repo has no PyPI publish workflow on master, so `python-semantic-release` and `release.yml` were not added.
  • The `quality` make target has pre-existing pylint failures (unrelated to this migration) — these were present on `main` before this PR.

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.


🤖 Generated with Claude Code

farhan and others added 2 commits July 23, 2026 12:55
… groups

- 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
- Update tox.ini to use tox-uv>=1 and uv-venv-lock-runner
- Update CI to use astral-sh/setup-uv; SHA-pin all actions
- Migrate .coveragerc config into pyproject.toml
- Update Makefile: upgrade → uv lock --upgrade; requirements → uv sync
- Remove requirements/ directory and stale config files
- Retain pylint/isort/pycodestyle/pydocstyle/mypy as quality linters

Part of openedx/public-engineering#506

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rget

- Add doc8 to the doc dependency group (was missing, needed by tox docs env)
- Remove *.py glob from quality make target (setup.py no longer exists)
- Remove --recursive flag from isort (deprecated in isort 5.x)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@farhan farhan closed this Jul 23, 2026
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