From f4cfd558f72ef12d86f195e154753cbf4011fc00 Mon Sep 17 00:00:00 2001 From: Jeff Triplett Date: Sat, 7 Sep 2024 12:12:13 -0500 Subject: [PATCH] :heart: More UV love --- README.md | 2 +- justfile | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a111a30..e4c56af 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ ## :wrench: Install ```shell -$ django-admin startproject \ +$ uv run --with=django django-admin startproject \ --extension=ini,py,toml,yaml,yml \ --template=https://github.com/jefftriplett/django-startproject/archive/main.zip \ example_project diff --git a/justfile b/justfile index 2c067e9..78ec313 100644 --- a/justfile +++ b/justfile @@ -4,7 +4,7 @@ set dotenv-load := false just --list @_cog: - pipx run --spec cogapp cog -r README.md + uv run --with cogapp cog -r README.md @_fmt: just --fmt --unstable @@ -18,6 +18,8 @@ bootstrap *ARGS: cp .env-dist .env fi + python -m pip install --upgrade pip uv + just upgrade just build {{ ARGS }} --force-rm @@ -32,15 +34,14 @@ bootstrap *ARGS: docker compose down {{ ARGS }} @lint *ARGS: - python -m pre_commit run {{ ARGS }} --all-files + uv run --with pre-commit-uv pre-commit run {{ ARGS }} --all-files @lock *ARGS: docker compose run \ --no-deps \ --rm \ utility \ - bash -c "python -m uv pip compile {{ ARGS }} ./requirements.in \ - --resolver=backtracking \ + bash -c "uv pip compile {{ ARGS }} ./requirements.in \ --output-file ./requirements.txt" @logs *ARGS: @@ -77,7 +78,10 @@ bootstrap *ARGS: docker compose restart {{ ARGS }} @run *ARGS: - docker compose run --rm --no-deps utility {{ ARGS }} + docker compose run \ + --no-deps \ + --rm \ + utility {{ ARGS }} @start *ARGS="--detach": just up {{ ARGS }} @@ -89,7 +93,10 @@ bootstrap *ARGS: just logs --follow @test *ARGS: - docker compose run --rm --no-deps utility python -m pytest {{ ARGS }} + docker compose run \ + --no-deps \ + --rm \ + utility python -m pytest {{ ARGS }} @up *ARGS: docker compose up {{ ARGS }}