Skip to content

Use uv and caching in CI#4515

Merged
chrishalcrow merged 3 commits intoSpikeInterface:mainfrom
galenlynch:ci/uv-pip-install
Apr 17, 2026
Merged

Use uv and caching in CI#4515
chrishalcrow merged 3 commits intoSpikeInterface:mainfrom
galenlynch:ci/uv-pip-install

Conversation

@galenlynch
Copy link
Copy Markdown
Contributor

Should speed things up!

Should speed things up.
v8.0.0 exists, but they haven't made a major tag yet.
@samuelgarcia
Copy link
Copy Markdown
Member

very cool.
why do we need the --system flag ? for caching ?

@galenlynch
Copy link
Copy Markdown
Contributor Author

galenlynch commented Apr 15, 2026

So uv uses the setup-python-installed python and installs packages into that, instead of trying to use its own python and venv. That allows python args... commands to 'just work', instead of needing to do uv run python args.... Since not all maintainers are using uv lockfiles etc, I think this is the simplest way to use uv pip as a faster pip, instead of having to adopt uv's entire workflow.

Python is also cached on many of the github runners, so setup-python is quite a bit faster (it's already on the runner) than using uv to get python (download over network).

@galenlynch
Copy link
Copy Markdown
Contributor Author

galenlynch commented Apr 15, 2026

Put another way, pip install already installs into the system site packages if it's not run in a virtual environment. In contrast, uv pip install will install into a uv-maintained virtual environment even if it's not run in a virtual environment. To truly emulate pip install with uv, you need to tell uv you really want to mutate the system site packages with uv pip install --system, or set an equivalent environment variable (but that affects all other uv commands, which might not be what you want).

@samuelgarcia
Copy link
Copy Markdown
Member

OK. Thanks. THis is super clear.

@alejoe91 alejoe91 added the continuous integration Related to CI label Apr 17, 2026
@chrishalcrow chrishalcrow merged commit 2c6f251 into SpikeInterface:main Apr 17, 2026
15 checks passed
@chrishalcrow
Copy link
Copy Markdown
Member

Thanks @galenlynch , looks like this cuts 20s or so off some of our test runs. Really really beneficial when doing the core tests, which can now take less than a minute to run in CI in full!!! Amazing.

@galenlynch galenlynch deleted the ci/uv-pip-install branch April 17, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants