Skip to content

Commit

Permalink
❤️ More UV love
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftriplett committed Sep 7, 2024
1 parent c24fad9 commit f4cfd55
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 13 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down

0 comments on commit f4cfd55

Please sign in to comment.