-
-
Notifications
You must be signed in to change notification settings - Fork 506
Update release documentation, workflow and build-and-check job to uv
#2846
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
Conversation
Aligns `django-stubs` with the changes I have been making in `djangorestframework-stubs`.
Related note: I'm not sure if there are any significant differences between the two. I can submit a PR to change it here too, if anybody thinks that's beneficial. |
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.
Pull Request Overview
This PR modernizes the build and release workflows by migrating from traditional Python build tools to uv
, a modern Python package manager. The changes align django-stubs
with similar updates made to djangorestframework-stubs
.
- Replaced PyPI
build
dependency withuv build
command - Added lockfile validation to ensure
uv.lock
stays up-to-date - Updated Python version from 3.12 to 3.13 across workflows
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
CONTRIBUTING.md | Updated release documentation to reference pyproject.toml instead of setup.py and added uv lock step |
.github/workflows/test.yml | Migrated build-and-check job to use uv with lockfile validation |
.github/workflows/release.yml | Updated release workflow to use uv build instead of Python build module |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Don't have strong opinion on that, I think they both work well for this kind of simple package. |
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.
I'm not sure if there are any significant differences between the two. I can submit a PR to change it here too, if anybody thinks that's beneficial.
For my 2¢, I'm happy for this to be switched to the uv-build
backend. One less explicit dependency (as uv
already bundles its own build backend).
uvx twine check --strict dist/* | ||
uvx twine check --strict ext/dist/* |
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.
Can we get rid of twine in favour of uv publish
?
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.
Publishing (release.yml
) doesn't use twine (at least not directly), it uses pypa/gh-action-pypi-publish@v1.13.0
.
This is just doing some checks on every PR build. According to twine docs: "Checks whether your distribution’s long description will render correctly on PyPI"
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.
🤦🏻 Of course, scanned across that too quickly!
However, having now looked at this comment and checked the source myself, I think we can just remove this step entirely - it only checks that rST can render properly and we're using markdown - so it's effectively a noop.
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.
Will do in a follow-up
Aligns parts of
django-stubs
with the changes I have been making indjangorestframework-stubs
:build-and-check
changes: Switch touv
to manage dev dependencies djangorestframework-stubs#797release
changes: Switch release workflow touv
djangorestframework-stubs#838Changes:
uv build
instead of PyPIbuild
dependencybuild-and-check
check to ensureuv.lock
is up to date