Skip to content

uv

A set of tasks for a Python uv project

List of tasks

Tasks Description
uv:audit [UV] Audit dependencies for CVEs with pip-audit. Arguments: [ARGS|A="--desc"] (*)
uv:format [UV] Format Python code with Ruff. Arguments: [ARGS|A="."] (*)
uv:lint [UV] Lint Python code with Ruff. Arguments: [ARGS|A="."] [FIX|F=y|Y] (*)
uv:lock [UV] Update lockfile. Arguments: [ARGS|A=""] [IMG|I=ghcr.io/astral-sh/uv:latest] [PULL|P=n|N] (*)
uv:pytest [UV] Run Pytest test suite. Arguments: [ARGS|A=""] (*)
uv:run [UV] Run a command in the uv environment. Arguments: CMD|C="..." (*)
uv:sync [UV] Synchronize project environment. Arguments: [ARGS|A=""] [IMG|I=ghcr.io/astral-sh/uv:latest] [PULL|P=n|N] (*)
uv:tree [UV] Display dependency tree. Arguments: [ARGS|A=""] (*)
uv:typecheck [UV] Static type checking with mypy. Arguments: [ARGS|A="."] (*)
uv:upgrade [UV] Upgrade dependencies to latest versions. Arguments: [ARGS|A=""] [IMG|I=ghcr.io/astral-sh/uv:latest] [PULL|P=n|N] (*)

global variables

Variables Description Default value
IMAGE_UV - ghcr.io/astral-sh/uv:latest

uv:audit

[UV] Audit dependencies for CVEs with pip-audit. Arguments: [ARGS|A="--desc"] (*)

[UV] Audit dependencies for CVEs with pip-audit.
Usage: task uv:audit [ARGS|A=<args>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to pip-audit (optional, by default --desc)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:format

[UV] Format Python code with Ruff. Arguments: [ARGS|A="."] (*)

[UV] Format Python code with Ruff.
Usage: task uv:format [ARGS|A=<path>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to ruff format (optional, by default .)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:lint

[UV] Lint Python code with Ruff. Arguments: [ARGS|A="."] [FIX|F=y|Y] (*)

[UV] Lint Python code with Ruff.
Usage: task uv:lint [ARGS|A=<path>] [FIX|F=<y|Y>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to ruff check (optional, by default .)
FIX | F Fix linting issues (optional, by default yes)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:lock

[UV] Update lockfile. Arguments: [ARGS|A=""] [IMG|I=ghcr.io/astral-sh/uv:latest] [PULL|P=n|N] (*)

[UV] Update lockfile.
Usage: task uv:lock [ARGS|A=<args>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to uv lock (optional)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:pytest

[UV] Run Pytest test suite. Arguments: [ARGS|A=""] (*)

[UV] Run Pytest test suite.
Usage: task uv:pytest [ARGS|A=<args>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to pytest (optional)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:run

[UV] Run a command in the uv environment. Arguments: CMD|C="..." (*)

[UV] Run a command in the uv environment.
Usage: task uv:run CMD|C=<command> [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
CMD | C Command to execute in uv environment (required)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:sync

[UV] Synchronize project environment. Arguments: [ARGS|A=""] [IMG|I=ghcr.io/astral-sh/uv:latest] [PULL|P=n|N] (*)

[UV] Synchronize project environment.
Usage: task uv:sync [ARGS|A=<args>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to uv sync (optional)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:tree

[UV] Display dependency tree. Arguments: [ARGS|A=""] (*)

[UV] Display dependency tree.
Usage: task uv:tree [ARGS|A=<args>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to uv tree (optional)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:typecheck

[UV] Static type checking with mypy. Arguments: [ARGS|A="."] (*)

[UV] Static type checking with mypy.
Usage: task uv:typecheck [ARGS|A=<path>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to mypy (optional, by default .)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker

uv:upgrade

[UV] Upgrade dependencies to latest versions. Arguments: [ARGS|A=""] [IMG|I=ghcr.io/astral-sh/uv:latest] [PULL|P=n|N] (*)

[UV] Upgrade dependencies to latest versions.
Usage: task uv:upgrade [ARGS|A=<args>] [IMG|I=<docker_image>] [PULL|P=<n|N>]
Arguments Description
ARGS | A Arguments or options to pass to uv lock --upgrade (optional)
IMG | I Docker image to use (optional, by default ghcr.io/astral-sh/uv:latest)
PULL | P Pull docker image (optional, by default yes)

Requirements:

  • uv or docker