File tree Expand file tree Collapse file tree 1 file changed +14
-22
lines changed Expand file tree Collapse file tree 1 file changed +14
-22
lines changed Original file line number Diff line number Diff line change @@ -6,47 +6,39 @@ VENV_DIRNAME := ".venv"
6
6
@_ default :
7
7
just --list
8
8
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
+
9
16
# setup development environment
10
- @ bootstrap :
17
+ @ bootstrap : check_uv
11
18
if [ -x $VENV_DIRNAME ]; then \
12
19
echo " Already bootstraped. Exiting." ; \
13
20
exit; \
14
21
fi
15
22
16
- echo " Creating virtual env in .venv"
17
- just create_venv
18
-
19
23
echo " Installing dependencies"
20
24
just upgrade
21
25
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
-
34
26
# 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
37
29
38
30
# run pre-commit rules on all files
39
- @ lint : create_venv
31
+ @ lint : check_uv
40
32
uvx --with pre-commit-uv pre-commit run --all-files
41
33
42
34
# run test suite
43
- @ test : create_venv
35
+ @ test : check_uv
44
36
uv run pytest --cov --cov-report=html --cov-report=term
45
37
46
38
# run test suite
47
- @ test-all : create_venv
39
+ @ test-all : check_uv
48
40
uvx --with tox-uv tox
49
41
50
42
# serve docs during development
51
- @ serve-docs :
43
+ @ serve-docs : check_uv
52
44
uvx --with mkdocs-material mkdocs serve
You can’t perform that action at this time.
0 commit comments