-
Notifications
You must be signed in to change notification settings - Fork 22
build: modernize openedx-webhooks to use uv and pyproject.toml #440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
farhan
wants to merge
5
commits into
openedx:master
Choose a base branch
from
farhan:farhan/modernize-python-repos
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d6b0f5c
build: modernize openedx-webhooks to use uv and pyproject.toml
farhan 9de9e50
fix: rename check-setup.py target to check-pyproject.toml
farhan c13d922
fix: improve pyproject.toml check success message
farhan 7f73673
fix: restore Tests job to produce 'Tests (ubuntu-latest, 3.12)' check…
farhan 3636534
fix: update .readthedocs.yaml to use uv instead of deleted requiremen…
farhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,4 +16,7 @@ build: | |
|
|
||
| python: | ||
| install: | ||
| - requirements: requirements/dev.txt | ||
| - method: uv | ||
| command: sync | ||
| groups: | ||
| - doc | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Exclude development, test, and documentation folders | ||
| prune .github | ||
| prune docs | ||
| prune tests | ||
|
|
||
| # Exclude root level configuration and build files | ||
| exclude Makefile | ||
| exclude conftest.py | ||
| exclude .gitignore | ||
| exclude tox.ini |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,152 @@ | ||
| [build-system] | ||
| requires = ["setuptools"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "openedx_webhooks" | ||
| version = "0.1.0" | ||
| description = "Automated tasks for Open edX" | ||
| requires-python = ">=3.12" | ||
| license = "Apache-2.0" | ||
| license-files = ["LICENSE*"] | ||
| authors = [ | ||
| {name = "Open edX Project", email = "oscm@openedx.org"}, | ||
| ] | ||
| classifiers = [ | ||
| "Development Status :: 3 - Alpha", | ||
| "Framework :: Flask", | ||
| "Intended Audience :: Developers", | ||
| "Natural Language :: English", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.12", | ||
| ] | ||
| keywords = [ | ||
| "Python", | ||
| "edx", | ||
| ] | ||
|
|
||
| readme = "README.rst" | ||
|
|
||
| dependencies = [ | ||
| "Flask", | ||
| "celery[redis]", | ||
| "github3.py", | ||
| "Flask-SSLify", | ||
| "PyYAML", | ||
| "URLObject", | ||
| "arrow", | ||
| "blinker", | ||
| "cachetools", | ||
| "click", | ||
| "cryptography", | ||
| "glom", | ||
| "gunicorn", | ||
| "jira", | ||
| "logging_tree", | ||
| "oauthlib[signedtoken]", | ||
| "redis", | ||
| "requests", | ||
| "requests-oauthlib", | ||
| "sentry-sdk[flask]", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://github.com/openedx/openedx-webhooks" | ||
| Repository = "https://github.com/openedx/openedx-webhooks" | ||
|
|
||
| [dependency-groups] | ||
| test = [ | ||
| "freezegun", | ||
| "pytest", | ||
| "pytest-cov", | ||
| "pytest-mock", | ||
| "pytest-repeat", | ||
| "pytz", | ||
| "requests-mock", | ||
| "repo-tools-data-schema @ git+https://github.com/openedx/repo-tools-data-schema.git", | ||
| ] | ||
| doc = [ | ||
| "Sphinx", | ||
| "readme_renderer", | ||
| "sphinx_rtd_theme", | ||
| "sphinxcontrib-httpdomain", | ||
| ] | ||
| quality = [ | ||
| {include-group = "test"}, | ||
| "edx-lint", | ||
| "isort", | ||
| "mypy", | ||
| "pylint-pytest", | ||
| "types-PyYAML", | ||
| "types-cachetools", | ||
| "types-requests", | ||
| ] | ||
| ci = [ | ||
| "tox", | ||
| "tox-uv", | ||
| ] | ||
| dev = [ | ||
| {include-group = "test"}, | ||
| {include-group = "ci"}, | ||
| "edx-lint", | ||
| "isort", | ||
| "mypy", | ||
| "pylint-pytest", | ||
| "python-dotenv", | ||
| "scriv", | ||
| "types-PyYAML", | ||
| "types-cachetools", | ||
| "types-requests", | ||
| ] | ||
|
|
||
| [tool.setuptools] | ||
| include-package-data = true | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| exclude = ["tests*", "*.tests", "*.tests.*"] | ||
|
|
||
| [tool.setuptools.package-data] | ||
| "*" = [ | ||
| "*.html", | ||
| "*.j2", | ||
| ] | ||
|
|
||
| [tool.uv] | ||
| package = true | ||
| # DO NOT EDIT constraint-dependencies DIRECTLY. | ||
| # This list is managed by `edx_lint write_uv_constraints` | ||
| # and will be overwritten the next time `make upgrade` is run. | ||
| # - GLOBAL constraints: edit edx_lint/files/common_constraints.txt | ||
| # - REPO-SPECIFIC constraints: edit [tool.edx_lint].uv_constraints in this file | ||
| constraint-dependencies = [ | ||
| "Django<6.0", | ||
| "elasticsearch<7.14.0", | ||
| ] | ||
|
|
||
| [tool.edx_lint] | ||
| # Repo-specific uv constraints merged with edx-lint's global constraints. | ||
| # Local entries override global ones for the same package. | ||
| # Run `make upgrade` to regenerate [tool.uv].constraint-dependencies. | ||
| uv_constraints = [] | ||
|
|
||
| [tool.coverage.run] | ||
| source = ["openedx_webhooks"] | ||
| branch = true | ||
|
|
||
| [tool.mypy] | ||
| ignore_missing_imports = true | ||
| check_untyped_defs = true | ||
|
|
||
| [tool.pytest.ini_options] | ||
| markers = [ | ||
| "flaky_github: tests to run with flaky GitHub behavior emulated", | ||
| ] | ||
| filterwarnings = [ | ||
| "ignore:SelectableGroups dict interface is deprecated. Use select.:DeprecationWarning", | ||
| ] | ||
|
|
||
| [tool.scriv] | ||
| output_file = "README.rst" | ||
| rst_header_chars = "~." | ||
| categories = "" | ||
| version = "" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv tool install tox --with tox-uvinstalls an unpinned, un-lockfiled global tox outsideuv.lock— this is the same anti-pattern flagged elsewhere in this migration effort. Sinceci.ymlusesuv sync --group ci+uv run tox(the locked, pinned tox from thecidependency-group) and no Makefile target here actually invokes baretoxeither, this line looks unnecessary — recommend dropping it.