generated from tweag/project
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TemporaryAutoInstallResolver: Use
uv
if available
Until now TemporaryAutoInstallResolver has used venv.create() to create the temporary virtualenv and then run `pip install` to install dependencies into this venv. This works, but is slow. So slow, in fact, that our tests (test_resolver in particular) have had to implement caching of the virtualenv simply to reduce the test runtime from ~60s to ~15s (runtimes vary wildly since this is a hypothesis test, but these are averages from mutiple runs). When `uv` is available we can use it to both create the temporary virtualenv, as well as install packages into it. Due to `uv` itself and the local cache of packages that it maintains, this is now so fast that we no longer have to cache the virtualenv in test runs (test_resolver now takes ~7s without caching, and ~6s with caching). For now, we don't make this configurable: If `uv` is found in $PATH, we will use it, otherwise we fall back to venv + pip.
- Loading branch information
Showing
3 changed files
with
101 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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 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 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