Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #377 +/- ##
=======================================
Coverage 95.82% 95.83%
=======================================
Files 23 23
Lines 3069 3070 +1
Branches 128 128
=======================================
+ Hits 2941 2942 +1
Misses 115 115
Partials 13 13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
c53cee9 to
b741e29
Compare
ebd0e5e to
2a080b8
Compare
Part of openedx/public-engineering#506. Moves packaging to static pyproject.toml metadata with a src/ layout, replaces pip-compile with uv dependency groups and a committed uv.lock, and adds python-semantic-release so releases publish via OIDC. Test packages are kept out of the wheel: with setuptools-scm, include-package-data = true would re-add every git-tracked file under submissions/ as package data, shipping test files master's wheel never had. The explicit *.html rule still ships submissions.html. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d317cea to
d62bc7d
Compare
irfanuddinahmad
left a comment
There was a problem hiding this comment.
Before merging, a PyPI owner needs to add a trusted publisher for this repo with workflow release.yml. Earlier releases used an API token, so the first OIDC publish will fail without it.
| name: ${{ matrix.toxenv }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false |
There was a problem hiding this comment.
Please restore fail-fast: false under strategy:. It was on master, and this migration should keep CI behaviour unchanged.
| pip uninstall -y mysqlclient | ||
| pip install --no-binary mysqlclient mysqlclient | ||
| uv sync --locked --group test | ||
| uv pip install mysqlclient --no-binary mysqlclient |
There was a problem hiding this comment.
Please drop the uv pip install line and use uv run --with mysqlclient --no-binary-package mysqlclient python ./manage.py makemigrations --dry-run instead. uv pip install changes the venv outside uv.lock.
| python: | ||
| install: | ||
| - requirements: requirements/docs.txt | ||
| commands: |
There was a problem hiding this comment.
Please use RTD's native uv install instead of build.commands: restore the sphinx: block (configuration: docs/source/conf.py, fail_on_warning: true) and add python: install: - method: uv / command: sync / groups: [doc].
Keeping release.yml identical to openedx/sample-plugin (minus its monorepo-only lines) makes future syncs a plain diff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Master set fail-fast: false so one failing toxenv does not cancel the others. GitHub Actions defaults to true, so dropping it changed CI behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
uv pip install mutates the synced venv outside uv.lock. Layering mysqlclient with uv run --with keeps the project env matching the lock while still building mysqlclient from source as master did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Custom build.commands bypass RTD's sphinx step, so fail_on_warning and the configured conf.py path stop applying. RTD's uv method installs the doc group from uv.lock while keeping the standard sphinx build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| dist/* | ||
|
|
||
| - name: Upload | Distribution Artifacts | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
There was a problem hiding this comment.
Please bump the two artifact actions to sample-plugin's current pins: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 here and actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 in publish_to_pypi, so release.yml stays identical to sample-plugin (django-wiki already has them).
| TOXENV: ${{ matrix.toxenv }} | ||
| run: tox | ||
| - name: Run tox | ||
| run: uv run tox -e ${{ matrix.toxenv }} |
There was a problem hiding this comment.
Please use uv run --locked tox -e ${{ matrix.toxenv }}. Without --locked, uv run silently re-locks when uv.lock is stale instead of failing. It also matches i18n-tools, codejail-includes and platform-plugin-aspects.
|
|
||
| - name: Check Keywords | ||
| run: make check_keywords | ||
| run: uv run tox -e check_keywords |
There was a problem hiding this comment.
Please use uv run --locked tox -e check_keywords. Without --locked, uv run silently re-locks when uv.lock is stale instead of failing. It also matches i18n-tools, codejail-includes and platform-plugin-aspects.
Important
Written with the assistance of Claude Code, human-reviewed before posting.
Modernize
edx-submissionsPart of openedx/public-engineering#506
Summary
src/layout (submissions/→src/submissions/).setup.py/setup.cfgwithpyproject.toml(PEP 621 static metadata).uvwith PEP 735 dependency groups; commituv.lock..coveragercinto[tool.coverage.run]inpyproject.toml.ci.yml,check-reserved-keywords.yml,migrations-check.yml) to useastral-sh/setup-uv(SHA-pinned to v10.2.0) withuv sync --locked.python-semantic-release+release.yml(OIDC trusted publishing), replacingpypi-publish.yml.requires-python = ">=3.12".Removed/Updated
Deleted files:
setup.py,setup.cfg,requirements/,.coveragerc,openedx.yaml(legacy file; ownership metadata lives incatalog-info.yaml),.github/workflows/pypi-publish.ymlRemoved Makefile targets:
compile-requirementsuv lockpiptoolscompile-requirements$(COMMON_CONSTRAINTS_TXT)requirements/common_constraints.txt; global constraints now come fromedx_lint write_uv_constraintsinto[tool.uv].constraint-dependenciesUpdated Makefile targets:
dev_requirementsuv sync --locked --group devinstead ofpip install -r requirements/pip.txt+requirements/dev.txttest_requirementsuv sync --locked --group testinstead ofpip install -r requirements/test.txtupgradeedx_lint write_uv_constraints pyproject.toml+uv lock --upgradeinstead ofmake compile-requirementstestpython -Wd -m pytest $(PYTEST_ARGS)(the command master'stox.iniran) instead of barepytest;tox.inipasses{posargs}throughPYTEST_ARGStest_qualitysrc/submissions;setup.pydropped from isort args;--config=pycodestyledropped (that file never existed; the config moved fromsetup.cfgto[pycodestyle]intox.ini)Updated workflows:
ci.ymlPython CIkept. Addsworkflow_call(used byrelease.yml), removes thepush: [master]trigger andfail-fast: false, runsuv sync --locked --group ci+uv run tox -e <env>check-reserved-keywords.ymluv run tox -e check_keywordsinstead ofmake check_keywordsin a pip-installed envmigrations-check.ymluv sync --locked --group test, thenuv pip install mysqlclient --no-binary mysqlclient(keeps master's source build of mysqlclient); drops the pip cache steprelease.yml(new)gh release create, then OIDC publish to PyPI; nofetch-depth: 0, nosecrets: inheritPython 3.11 dropped
Master's
tox.inienvlist waspy{311,312}-django{42,52}-drf{315,latest}, but the CI matrix and classifiers were already 3.12-only. Master'ssetup.pyhad nopython_requires;pyproject.tomlnow declaresrequires-python = ">=3.12".Versioning
setuptools-scmwithdynamic = ["version"](fallback_version = "0.0.0.dev0"). Master had a PyPI publish workflow;python-semantic-releasenow sets the version from git tags at release time.src/submissions/__init__.pyreads__version__fromimportlib.metadatainstead of hardcoding'4.0.2'. Thev4.0.2tag exists, so PSR will see the latest PyPI release.Important Notes
django{42,52}-drf{315,latest}, quality, docs(thepyfactor is dropped because only 3.12 is tested). Each test env maps to its own dependency group intox.ini;django52-drflatestuses thetestgroup.tox -e <env> -- <pytest args>still works.Tests (ubuntu-latest, 3.12, <toxenv>)to<toxenv>(e.g.django42-drflatest). If branch protection requires the old check names, they need updating.django42-drflatestonly, same as master.fail-fast: falseremoved from theci.ymlmatrix, so it now defaults totrue: one failing matrix job cancels the rest.Requires-Distas master's wheel, plussubmissions/submissions.html. Master's wheel left that file out even thoughsrc/submissions/views/__init__.pyrenders it, so this is a fix.license = "AGPL-3.0-only". Authors are nowOpen edX Project, and the long description now comes fromREADME.rst(master used a one-line string). No keywords are added.[tool.edx_lint].uv_constraintsis empty: master's only local constraint (backports.zoneinfo;python_version<"3.9") does not apply on Python 3.12. The global constraints from master'scommon_constraints.txtare in[tool.uv].constraint-dependencies.testgroup no longer pulls in the docs dependencies (master'srequirements/test.inhad-r docs.txt); Sphinx and friends live only in thedocgroup. Thecheck_keywordstox env now uses thequalitygroup (master usedrequirements/dev.txt)..readthedocs.yamlinstalls withuv sync --locked --group docand builds withsphinx-build -W, so warnings still fail the build, as with master'sfail_on_warning: true.commitlint.ymlwas already on master, so conventional commit format is already enforced.Testing
Note: PR creator has tested the PR via CI and building the packages manually. No manual testing has been done to test the repo features. It will be great if the repo owner could test it.
🤖 Generated with Claude Code