Repository navigation
Conversation
|
Thanks for the pull request, @irfanuddinahmad! This repository is currently unmaintained. 🔘 Find a technical reviewerTo get help with finding a technical reviewer, reach out to the community contributions project manager for this PR:
Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Verified uv sync --locked --group ci passes cleanly. Per feanil's review on openedx#444: discussion_r4147313381. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@irfanuddinahmad this can't be rebased off of master without dealing with conflicts, can you deal with that and then I'll merge once it's green. |
- Move package to src/ layout - Replace setup.py/setup.cfg with PEP 621 pyproject.toml metadata - Switch from pip-compile requirements to uv with PEP 735 dependency groups and a committed uv.lock - Use tox-uv in tox.ini and astral-sh/setup-uv in CI - Replace tag-triggered pypi-publish.yml with python-semantic-release and OIDC trusted publishing in release.yml Part of openedx/public-engineering#506. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fabbd43 to
86e6eb0
Compare
|
Rebased onto master (squashed to a single commit), CI is green. |
Summary
Modernize
auth-backendsto uv + pyproject.toml (PEP 621/735) + python-semantic-release.Part of openedx/public-engineering#506 (tracked in public-engineering#516).
auth_backends/tosrc/auth_backends/— per the confirmed decision on public-engineering#506 (2026-07-15) thatsrc/layout is in scope this cycle, precedented byxblock-core/xblock-extrassetup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata)uvwith PEP 735 dependency groups (test-base,test,quality,ci,dev); commituv.locktox.inito usetox-uvwithuv-venv-lock-runnerci.yml) to useastral-sh/setup-uv, SHA-pin all actions, addfetch-depth: 0so setuptools-scm sees tagspython-semantic-release+release.yml, replacing the old tag-triggeredpypi-publish.yml(stored PyPI token, unpinnedpypa/gh-action-pypi-publish@release/v1); publish to PyPI via OIDC trusted publishing insteadcommitlint.ymlalready existed and needed no changesRemoved
Deleted files:
setup.py,setup.cfg,requirements/(all.in/.txtfiles),.github/workflows/pypi-publish.ymlRemoved Makefile targets:
$(COMMON_CONSTRAINTS_TXT)wget target and thepyjwt/social-auth-coreconstraint-strippingsedsteps inupgrade(no longer needed —edx_lint write_uv_constraintshandles constraints now)Not included
No ruff/lint-tooling changes — pylint/pycodestyle/edx-lint are left exactly as configured before (no isort config existed in
setup.cfgto port); this migration is tooling-only, not a linting overhaul.Versioning
Dynamic —
setuptools-scmderives the package version from git tags (version_scheme = "only-version",local_scheme = "no-local-version",fallback_version = "0.0.0"). Confirmed the latest git tag (v5.0.0, viagit tag --sort=-v:refname) matches the latest version actually published on PyPI (5.0.0), so the first automated release frompython-semantic-releaseshould compute a version strictly newer than 5.0.0.Testing Notes
Verified locally:
uv lockresolves cleanly (uv lock --checkpasses)uv sync --group devsucceedsuv run tox— all three envs pass:django52(21 tests),quality(pycodestyle + pylint),check_keywordspython -m build(the exactbuild_commandsemantic-release will invoke) produces a correct wheel: entry points n/a, SPDX license expression, README-as-long-description, andedx_auth_backends-5.0.0.dist-info/licenses/LICENSE.txtall verified by inspecting the built wheel's METADATA/file list; test files (tests/*) are correctly excluded from the wheelomit(*/tests/*, etc.) drops the reported package coverage from 99% to 98% (a one-time ~1% drop from no longer counting test files' own trivially-covered statements) — well within the existingcodecov.yml's 95% project/patch thresholds, so nocodecov.ymlchange was needed for this repo (unlike some sibling repos in this effort where the drop was larger)src/layout: verifieduv syncgives an importable editable install (import auth_backendsresolves tosrc/auth_backends/__init__.py) andpython -m buildproduces a wheel withauth_backends/*at its root (thesrc/prefix is a source-tree-only convention). This repo has no mypy config to verify against.Could not verify locally (needs CI / a maintainer):
secrets.CODECOV_TOKENavailability)edx-auth-backends, as far as I can tell — this needs a maintainer with PyPI project-owner access to addopenedx/auth-backends'srelease.yml/publish_to_pypienvironment as a trusted publisher on pypi.org. This is not a blocker for merging this PR, but the first automated release will fail at thepublish_to_pypijob until it's set up. (OPENEDX_SEMANTIC_RELEASE_GITHUB_TOKENitself is already a standard org-level secret used by many other repos.)Known out-of-scope gap:
upgrade-python-requirements.yml.github/workflows/upgrade-python-requirements.ymlcalls the org's shared reusableworkflow, which hardcodes
ADD_PATHS="requirements"with no override input. Now thatrequirements/is deleted, this scheduled job will silently stop producing realdependency-upgrade PRs — same gap across every repo in this migration batch; needs a
fix in
openedx/.githubitself, not here.Code reviewer notes
sixremains a runtime dependency even though it's only imported byauth_backends/tests/test_backends.py, not by any production module — carried forward unchanged from the oldinstall_requiressince this migration doesn't touch actual dependency behavior.auth_backends/__init__.py's__version__now reads fromimportlib.metadatainstead of being hardcoded, to avoid it going stale after the first tag-less commit.release.yml's actions (python-semantic-release,actions/upload-artifact,actions/download-artifact,pypa/gh-action-pypi-publish, plusactions/checkout) are all SHA-pinned, each verified against the actual tag→commit mapping viagh api repos/<owner>/<repo>/commits/<sha>— matching the gold-standard pattern used across this migration batch (an earlier draft of this PR used plain version tags for everything butpypa/gh-action-pypi-publish, but that was superseded once the SHA-pinning convention was settled org-wide).tox.ini'scheck_keywordsenv anddb_keyword_overrides.yml/manage.pymechanism (fromedx-django-release-util) are unchanged in behavior, just switched todependency_groups = testand verified passing locally.This PR was created with Claude Code.