Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
84 lines (69 loc) · 2.06 KB
/
Copy pathjustfile
File metadata and controls
84 lines (69 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# justfile for libvt
# https://just.systems/
set shell := ["bash", "-uc"]
py_files := "find . -type f -not -path '*/\\.*' | grep -i '.*[.]py$' 2> /dev/null"
doc_files := "find . -type f -not -path '*/\\.*' | grep -i '.*[.]rst$\\|.*[.]md$\\|.*[.]css$\\|.*[.]py$\\|CHANGES\\|.*conf\\.py' 2> /dev/null"
all_files := "find . -type f -not -path '*/\\.*' | grep -i '.*[.]py$\\|.*[.]rst$\\|.*[.]md$\\|.*[.]css$\\|CHANGES\\|.*conf\\.py' 2> /dev/null"
# List all available commands
default:
@just --list
# Run tests with pytest
[group: 'test']
test *args:
uv run pytest {{ args }}
# Run tests then start continuous testing with pytest-watcher
[group: 'test']
start:
just test
uv run ptw .
# Watch files and run tests on change (requires entr)
[group: 'test']
watch-test:
#!/usr/bin/env bash
set -euo pipefail
if command -v entr > /dev/null; then
{{ all_files }} | entr -c just test
else
just test
just _entr-warn
fi
# Build documentation
[group: 'docs']
build-docs:
just -f docs/justfile html
# Serve documentation
[group: 'docs']
serve-docs:
just -f docs/justfile serve
# Start documentation server with auto-reload
[group: 'docs']
start-docs:
just -f docs/justfile start
# Format code with ruff
[group: 'lint']
ruff-format:
uv run ruff format .
# Run ruff linter
[group: 'lint']
ruff:
uv run ruff check .
# Run ty type checker
[group: 'lint']
ty:
uv run ty check
# Watch files and run ty on change
[group: 'lint']
watch-ty:
uv run ty check --watch
# Run in-process VT throughput benchmark
[group: 'bench']
bench *args:
uv run python scripts/bench_vt.py {{ args }}
[private]
_entr-warn:
@echo "----------------------------------------------------------"
@echo " ! File watching functionality non-operational ! "
@echo " "
@echo "Install entr(1) to automatically run tasks on file change."
@echo "See https://eradman.com/entrproject/ "
@echo "----------------------------------------------------------"