feat: modernize to uv + pyproject.toml (PEP 621/735)#253
Draft
farhan wants to merge 5 commits into
Draft
Conversation
3 tasks
farhan
marked this pull request as draft
July 17, 2026 16:36
farhan
force-pushed
the
farhan/modernize-python-repo
branch
from
July 22, 2026 07:46
c32d10d to
bfffd59
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Required by the toctree in xapi_db_load.rst; docs build fails without them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
farhan
force-pushed
the
farhan/modernize-python-repo
branch
from
July 22, 2026 07:59
74ef3fe to
b702656
Compare
farhan
marked this pull request as ready for review
July 22, 2026 08:00
Newer sphinx_book_theme (Sphinx 9.x) no longer supports the 'logo_only' theme option, which emitted a warning. Since the docs build runs with -W (warnings treated as errors), this failed the docs CI check. Removing the option to match the modernized config. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remove the >=61.0 version pin on setuptools in [build-system].requires to match the openedx modernization reference repos, which use a bare "setuptools" specifier. This also resolves the SPDX license-expression concern, since a current/bare setuptools supports PEP 639 license = "AGPL-3.0-only". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove `fail-fast: false` from the CI matrix strategy (omit the key so it defaults to `true`, matching org convention) - Drop the newly added Codecov upload step; master had no coverage upload, and it introduced a hard `CODECOV_TOKEN` dependency with `fail_ci_if_error: true` - Restore `warn_unused_ignores = true` (master value) and remove the two now-unused `# type: ignore[arg-type]` comments in ui/log_ui.py Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
xapi-db-loadto 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.lockpyproject.tomltox.inito usetox-uvwithuv-venv-lock-runnerastral-sh/setup-uv; SHA-pin all actions; addworkflow_calltriggermypytox env and CI matrix entry (mypy was already used on master inmake quality)Removed
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,openedx.yaml(legacy, superseded bycatalog-info.yaml)Removed Makefile targets:
upgradewas rewritten from pip-compile to uvNot included/implemented
release.yml/python-semantic-release— master had no PyPI publish workflow.src/layout — package remains at the top level; repo does not publish to PyPI, so flat layout was retained for simplicity.Versioning
[Static]
version = "3.1.0"declared directly inpyproject.toml— master had no PyPI publish workflow, sosetuptools-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:
isortconfig was migrated fromsetup.cfg [isort]to[tool.isort]inpyproject.toml;mypyconfig was migrated fromsetup.cfg [mypy]to[tool.mypy]inpyproject.tomlmypywas already used on master inmake qualitybut was not in the CI matrix; it now has its own tox env (mypy) and appears in the CI matrix so CI runs itdocs/conf.pyupdated to useimportlib.metadata.versioninstead of reading__version__from__init__.py(removed since version ownership moves topyproject.toml).readthedocs.yamlupdated to use modern build config (ubuntu-lts-latest) and install docs optional dependencies viapip install -e .[docs][project.optional-dependencies.docs]added for ReadTheDocs compatibility (in addition to thedocdependency group used by tox)Django<6.0,elasticsearch<7.14.0) were populated byedx_lint write_uv_constraintsfrom the edx-lint common constraints file🤖 Generated with Claude Code