RepoPilot

astral-sh / uv

Search astral-sh/uv

GitHub

Get started

From the repository's own files at 59e5912ecff5. Commands have not been executed.

Prerequisites

Commands

No root scripts captured. Check pyproject.toml .

Install and use

README.md

Install uv with our standalone installers:

# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Or, from PyPI:

# With pip.
pip install uv
# Or pipx.
pipx install uv

If installed via the standalone installer, uv can update itself to the latest version:

uv self update

See the installation documentation for details and alternative installation methods.

Open README.md

Developing

CONTRIBUTING.md

Snapshot testing

uv uses insta for snapshot testing. It's recommended (but not necessary) to use cargo-insta for a better snapshot review experience. See the installation guide for more information.

In tests, you can use uv_snapshot! macro to simplify creating snapshots for uv commands. For example:

#[test]
fn test_add() {
    let context = TestContext::new("3.12");
    uv_snapshot!(context.filters(), context.add().arg("requests"), @"");
}

To run and review a specific snapshot test:

cargo test --package <package> --test <test> -- <test_name> -- --exact
cargo insta review

A script is available to update the snapshots based on results in CI. This is useful for updating snapshots without re-running the test suite and for updating platform-specific snapshots.

./scripts/apply-ci-snapshots.sh

Read the rest of CONTRIBUTING.md