Skip to content

chore: modernize Python tooling (uv, pyproject.toml, src layout, semantic release)#283

Open
salman2013 wants to merge 5 commits into
openedx:masterfrom
salman2013:modernize-python-tooling
Open

chore: modernize Python tooling (uv, pyproject.toml, src layout, semantic release)#283
salman2013 wants to merge 5 commits into
openedx:masterfrom
salman2013:modernize-python-tooling

Conversation

@salman2013

Copy link
Copy Markdown

Summary

  • Phase 1: Migrates package metadata from setup.py to pyproject.toml (PEP 621) with setuptools-scm for dynamic versioning and importlib.metadata for __version__
  • Phase 2: Replaces pip-tools + requirements/ with uv dependency groups (test-base, test, django42, quality, ci, dev), adds tox.ini with uv-venv-lock-runner and a Django 4.2/5.2 version matrix, and updates CI to use astral-sh/setup-uv
  • Phase 3: Adds [tool.semantic_release] config and release.yml workflow (runs CI → cuts release → publishes to PyPI via OIDC), replaces the old tag-triggered pypi-publish.yml
  • Phase 4: Moves package to src/crowdsourcehinter/ layout

Test plan

  • make quality passes (tox -e quality)
  • make test passes (tox -e py312-django42 and tox -e py312-django52)
  • CI matrix runs all three envs: quality, py312-django42, py312-django52
  • Configure OIDC trusted publisher on PyPI (workflow: release.yml)

🤖 Generated with Claude Code

salman2013 and others added 4 commits July 17, 2026 19:06
Replaces setup.py with pyproject.toml using PEP 621 static metadata,
setuptools-scm for dynamic versioning, and importlib.metadata for __version__.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces requirements/*.txt/in files with uv dependency groups in
pyproject.toml (test-base, test, django42, quality, ci, dev), adds
tox.ini with uv-venv-lock-runner and a Django version matrix, and
updates CI to use astral-sh/setup-uv with uv sync/run tox.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds [tool.semantic_release] config using setuptools-scm for dynamic
versioning, and replaces the tag-triggered pypi-publish.yml with a
release.yml that runs CI, cuts a release, and publishes to PyPI via
OIDC trusted publisher.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moves crowdsourcehinter/ to src/crowdsourcehinter/ and updates
pyproject.toml (where = ["src"]), tox.ini, and pytest.ini paths
accordingly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jul 17, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @salman2013!

This repository is currently maintained by @openedx/openedx-unmaintained.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where 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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

- Add [flake8] max-line-length = 127 to tox.ini to match original CI config
- Add noqa: F401 to intentional CrowdsourceHinter re-export in __init__.py
- Fix pre-existing style violations in crowdsourcehinter.py (E203, E231,
  E261, E303, E501, W291, W293)
- Remove django test envs from CI matrix until tests are written

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Jul 20, 2026
@mphilbrick211

Copy link
Copy Markdown

@feanil can you help with reviewing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants