Skip to content

Commit c9b3895

Browse files
committed
justfile now completely depends on uv.
1 parent f5113de commit c9b3895

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

justfile

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,39 @@ VENV_DIRNAME := ".venv"
66
@_default:
77
just --list
88

9+
[private]
10+
@check_uv:
11+
if ! command -v uv &> /dev/null; then \
12+
echo "uv could not be found. Exiting."; \
13+
exit; \
14+
fi
15+
916
# setup development environment
10-
@bootstrap:
17+
@bootstrap: check_uv
1118
if [ -x $VENV_DIRNAME ]; then \
1219
echo "Already bootstraped. Exiting."; \
1320
exit; \
1421
fi
1522

16-
echo "Creating virtual env in .venv"
17-
just create_venv
18-
1923
echo "Installing dependencies"
2024
just upgrade
2125

22-
# create a virtual environment
23-
@create_venv:
24-
[ -d $VENV_DIRNAME ] || uv venv $VENV_DIRNAME
25-
26-
# build release
27-
@build:
28-
uv build
29-
30-
# publish release
31-
@publish: build
32-
uv publish
33-
3426
# upgrade/install all dependencies defined in pyproject.toml
35-
@upgrade: create_venv
36-
uv sync --all-extras
27+
@upgrade: check_uv
28+
uv sync --all-extras --upgrade
3729

3830
# run pre-commit rules on all files
39-
@lint: create_venv
31+
@lint: check_uv
4032
uvx --with pre-commit-uv pre-commit run --all-files
4133

4234
# run test suite
43-
@test: create_venv
35+
@test: check_uv
4436
uv run pytest --cov --cov-report=html --cov-report=term
4537

4638
# run test suite
47-
@test-all: create_venv
39+
@test-all: check_uv
4840
uvx --with tox-uv tox
4941

5042
# serve docs during development
51-
@serve-docs:
43+
@serve-docs: check_uv
5244
uvx --with mkdocs-material mkdocs serve

0 commit comments

Comments
 (0)