-
Notifications
You must be signed in to change notification settings - Fork 7
refactor: Convert to use uv
#248
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
1faa36d
Converted to use uv and hatch over venv and tox
OCopping 4f3290c
Replace tox with tox-uv; Remove hatch.yml
OCopping e67dd5a
Fix CI when building env
OCopping 738f4fb
Remove hatch run from _test.yml; Bump pre-commit hook versions
OCopping 4aecf11
Fix pytest runner
OCopping 5403646
Update template files for uv
OCopping be8066a
Tidy pyproject.toml
OCopping 70015df
Revert unintended ci.yml changes
OCopping 7ff792c
Fix actions build, and updates to pyproject.toml
OCopping 5ce9caf
Improvements to template pyproject.toml
OCopping c71bdfb
Fixes to dev container and tests (but some test cases fail, e.g. runn…
OCopping 50defbc
Revert changes to ci.yml
OCopping 45c895a
Update pre-commit-config
OCopping 5bbb867
Revert discussed changes and remove commented out parts
callumforrester 9e5654e
Move to managing devcontainer environment outside of dockerfile
callumforrester 99fae79
Add config for using uv
callumforrester 1933864
Update Dockerfile and devcontainer to use uv
callumforrester 0822761
Update workflows to use uv
callumforrester 76d0fe2
Fix Dockerfiles (move UV_VERSION to top of file, and assign new build…
OCopping 063674b
Convert _dist.yml to use uvx over pipx
OCopping d2dc4c2
Update to use setup-uv@v6
OCopping b8b3f90
Convert to use dls ubuntu-devcontainer
OCopping dd1a4ec
fix apt installs in Dockerfile template
gilesknap 581aaba
Add missing if docker jinja tag
OCopping d55fd3b
Merge remote-tracking branch 'origin/main' into move-to-uv
coretl cf3f4be
Add in changes from ophyd-async
coretl 3d617c6
Merge remote-tracking branch 'origin/move-to-uv' into move-to-uv
coretl 87224d4
tox-uv tweaks
coretl 328d50a
Disable pep8-naming for the top level
coretl 7073cba
Add docs
coretl 650f006
Update .github/workflows/_tox.yml
coretl 2555a8a
Address review comments
coretl 64dcd6b
Move back to tox TOML format
coretl f69d899
Don't autoforward ports in devcontainer
coretl 5a6a047
Tidy diff
coretl 07a92bd
Remove pytest version pinning from template pyproject.toml
OCopping 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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 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
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
OCopping marked this conversation as resolved.
Show resolved
Hide resolved
|
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
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 @@ | ||
3.11 |
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 |
---|---|---|
@@ -1,13 +1,8 @@ | ||
# The devcontainer should use the developer target and run as root with podman | ||
# or docker with user namespaces. | ||
ARG PYTHON_VERSION=3.11 | ||
FROM python:${PYTHON_VERSION} AS developer | ||
# The developer stage is used as a devcontainer including dev versions | ||
# of the build dependencies | ||
FROM ghcr.io/diamondlightsource/ubuntu-devcontainer:noble AS developer | ||
|
||
# Add any system dependencies for the developer/build environment here | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
graphviz \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Set up a virtual environment and put it in PATH | ||
RUN python -m venv /venv | ||
ENV PATH=/venv/bin:$PATH | ||
&& apt-get dist-clean |
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
Empty file.
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,23 @@ | ||
# 23. Adopt uv | ||
|
||
Date: 2025-09-22 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
[`uv`](https://docs.astral.sh/uv/) appears to be gaining a critical mass of adoption, and adopting the project flow would bring some benefits: | ||
- Much faster venv creation times | ||
- A native lockfile implementation | ||
- A single base image that can install multiple pythons | ||
- Which would allow us to make a single devcontainer base with our feature built in, which would speed up the devcontainer creation time | ||
|
||
## Decision | ||
|
||
We will adopt this flow. | ||
|
||
## Consequences | ||
|
||
Docs will need to be updated, especially around lockfile support. Commands will need to be updated slightly for the new version of tox. Work on `renovate` will need to follow as `dependabot` does not support the uv lockfile. |
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
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.
Uh oh!
There was an error while loading. Please reload this page.