OpenAstronomy / github-actions-workflows

Reusable workflows for GitHub Actions
https://github-actions-workflows.openastronomy.org
MIT License
19 stars 13 forks source link

[PROPOSAL 🚀 ] migrate to `uv` for installing python packages #192

Closed SauravMaheshkar closed 5 months ago

SauravMaheshkar commented 7 months ago

uv backed by Astral, the creators of Ruff, is an extremely fast Python package installer and resolver, written in Rust. According to their open-source benchmarks they are 10-100x faster than pip and pip-tools (pip-compile and pip-sync).

uv has been adopted by popular repositories such as diffusers with observed performance boost.

More than happy to take this up

Cadair commented 7 months ago

I believe there's no real need to do this in this repo. While there are a couple of pip commands in the workflow they only install a couple of packages. The real speedups would come from users configuring tox-uv and having tox use uv. As this is already possible, perhaps the only thing to do is mention it in the docs?

SauravMaheshkar commented 7 months ago

I believe there's no real need to do this in this repo. While there are a couple of pip commands in the workflow they only install a couple of packages. The real speedups would come from users configuring tox-uv and having tox use uv. As this is already possible, perhaps the only thing to do is mention it in the docs?

Thanks for the feedback, which part of the docs do you think would be best for this?

astrofrog commented 7 months ago

Looking into this a bit I think the easiest way to achieve this would be to install tox-uv at the same time as tox, which is something that could be done in the workflows. Maybe we could have an option for the tox workflow to install tox-uv?

Cadair commented 7 months ago

We already have the toxdeps: argument which lets you do that, so we don't need to do anything people just need to add toxdeps: tox-uv to any runs they want to use uv. Maybe putting an example under the toxdeps section of the docs is the best place? either that or adding a new FAQ section?

astrofrog commented 7 months ago

Sounds good!

SauravMaheshkar commented 7 months ago

I was thinking of adding some text to:

https://github.com/OpenAstronomy/github-actions-workflows/blob/77f4c83f8595003f7842bcff4d2c5ebb82b4aacd/docs/source/tox.rst#toxdeps

Cadair commented 7 months ago

@SauravMaheshkar :+1: that would be good thanks. It doesn't need to be much and should be phrased as an example of a general way to install tox plugins.

SauravMaheshkar commented 6 months ago

Sorry for the delay :) I opened #198