Conversation
Part of openedx/public-engineering#517 - Migrate setup.py/setup.cfg metadata to pyproject.toml (PEP 621) - Move package to src/ layout - Switch to uv with PEP 735 dependency groups; commit uv.lock - Replace pypi-release.yml with release.yml (OIDC trusted publishing via python-semantic-release) - Update CI to use astral-sh/setup-uv for quality checks; Docker-based tests unchanged - Add [tool.isort] and [tool.coverage] to pyproject.toml - Update __version__ to use importlib.metadata - Retain pylint/isort/pycodestyle as on master Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace requirements/*.txt file copies with uv-based installation. Install uv system-wide and use it to install tox + tox-uv into the main venv, replacing the old pip install -r requirements/testing.txt and requirements/tox.txt invocations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The test suite imports numpy (test_importing_lots_of_crap), which was previously provided via requirements/sandbox.txt in the tox test environment. Add numpy to the test-base group to restore parity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 tasks
The package declares dynamic versioning (setuptools-scm), but __init__ still hardcoded '4.1.1', so codejail.__version__ would silently drift from the real installed package version. Read it from installed metadata instead, matching the pyproject dynamic-version setup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
farhan
force-pushed
the
farhan/modernize-python-repo
branch
from
September 14, 2026 12:52
327d31e to
e6bdf44
Compare
The Dockerfile hardcoded `pip install numpy six` because no dependency group represented the sandbox deps — sandbox.in's packages had been scattered (numpy into test-base, six into runtime). Add a `sandbox` group mirroring sandbox.in and source test-base from it, so the Dockerfile installs from groups (`--group sandbox`, `--group ci`) instead of naming packages by hand. Drop the redundant numpy/six install into the main venv — tox provisions them into its own env from uv.lock. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
farhan
force-pushed
the
farhan/modernize-python-repo
branch
2 times, most recently
from
September 14, 2026 14:53
8f59ac8 to
ff7c7a6
Compare
The modernization moved quality to a native uv job (setup-uv + uv run tox), which diverged from master and forced per-step conditionals or a job split. codejail already ran quality inside the Docker/AppArmor container on master via `docker exec ... tox` with TOXENV=quality, so restore master's single-job CI verbatim and add only the `workflow_call` trigger that release.yml needs. Net diff vs master: one added line. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
farhan
force-pushed
the
farhan/modernize-python-repo
branch
from
September 14, 2026 15:02
ff7c7a6 to
7de502c
Compare
farhan
marked this pull request as ready for review
September 14, 2026 15:13
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. Refined and validated before being submitted for code review.
Modernize
codejailPart of openedx/public-engineering#517
Summary
edx-codejailon PyPIsrc/layoutsetup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata)uvwith PEP 735 dependency groups; commituv.lockpyproject.tomlci.ymlin parity with master — all jobs (test matrix + quality) run inside the Docker/AppArmor container; only aworkflow_calltrigger is added sorelease.ymlcan reuse itpython-semantic-release+release.yml(OIDC trusted publishing), replacing the legacypypi-release.ymlcommitlint.ymlwas already present on master — retained as-isRemoved/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,.github/workflows/pypi-release.ymlRemoved Makefile targets:
$(COMMON_CONSTRAINTS_TXT)(wget rule)[tool.edx_lint].uv_constraintsUpdated Makefile targets:
upgradeuv run --with edx-lint edx_lint write_uv_constraints pyproject.toml && uv lock --upgraderequirements/dev-requirementspip install -r requirements/*.txtwithuv sync --group devqualitycodejailtosrc/codejailto reflect src/ layout moveisortcodejailtosrc/codejailto reflect src/ layout movecleancodejailtosrc/codejailto reflect src/ layout moveVersioning
setuptools-scmwithdynamic = ["version"]— master had a PyPI publish workflow;python-semantic-releasecontrols the version string at release time via git tags.Important Notes
[testenv:docs]— codejail has no docs infrastructure (nodocs/directory, nomake docstarget, no Sphinx configuration), so the docs tox environment was intentionally omitted.bash -c 'tox', exactly as on master. The only change toci.ymlis an addedworkflow_calltrigger sorelease.ymlcan reuse it — so the required-check names are unchanged and branch protection needs no update.uv+ dependency groups — the Dockerfile no longer copiesrequirements/*.txt; it copiespyproject.toml/uv.lockand installs from dependency groups viauv pip install --group: the sandbox virtualenv from thesandboxgroup (numpy,six) and the main venv from thecigroup (tox,tox-uv). Asandboxdependency group was added to mirror the oldsandbox.in. No follow-up on the Docker-based test infrastructure is required.commitlint.ymlwas already present — not added by this PR.release.ymlusespython-semantic-releasewhich requires conventional commits (feat/fix/etc.) for automated versioning. All future PRs to this repo must use conventional commit format.v-prefixed format (e.g.v4.1.0) matching PSR's defaulttag_format = "v{version}". No manual baseline tag is required.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 quality,uv run python -m build). The Docker-based tests require AppArmor setup and cannot be run locally without the full Docker environment. Repo-owner is encouraged to run the repo's feature tests before merging.🤖 Generated with Claude Code