nasa / fprime

F´ - A flight software and embedded systems framework
https://fprime.jpl.nasa.gov
Apache License 2.0
10.05k stars 1.3k forks source link

feat(ci): migrate to uv for faster python deps installation #2626

Closed SauravMaheshkar closed 6 months ago

SauravMaheshkar commented 6 months ago

Change Description

This PR aims to migrate the python dependency installation to uv from pip. 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).

Rationale

This change will enable faster CI runs and therefore faster feedback to streamline the contribution workflow.

Testing/Review Recommendations

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

Future Work

There are some other workflow files which also use pip such as python-format but I avoided making those changes in this PR. If the maintainers find it useful other workflows using pip can be updated to use pip

thomas-bc commented 6 months ago

This is interesting, I didn't know about uv. We'll have to look into it, thanks for bringing it up and opening the PR!

LeStarch commented 6 months ago

While we deeply appreciate this contribution, we are not ready for such a change. Most of our users run pip to install F´  packages and our CI system reflect this. This traces to a "test as you fly, fly as you test" methodology. This means that our tests (in CI) must install using the same tools as our users.

Individuals and projects may of course choose to use uv to speed up their individual projects.

SauravMaheshkar commented 6 months ago

While we deeply appreciate this contribution, we are not ready for such a change. Most of our users run pip to install F´  packages and our CI system reflect this. This traces to a "test as you fly, fly as you test" methodology. This means that our tests (in CI) must install using the same tools as our users.

Individuals and projects may of course choose to use uv to speed up their individual projects.

Understandable, I appreciate the transparency.