forked from simonw/llm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
46 lines (38 loc) · 915 Bytes
/
Justfile
File metadata and controls
46 lines (38 loc) · 915 Bytes
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
# Run tests and linters
@default: test lint
# Run pytest with supplied options
@test *options:
uv run pytest {{options}}
# Run linters
@lint:
echo "Linters..."
echo " Black"
uv run black . --check
echo " cog"
uv run cog --check \
-p "import sys, os; sys._called_from_test=True; os.environ['LLM_USER_PATH'] = '/tmp'" \
README.md docs/*.md
echo " mypy"
uv run mypy llm
echo " ruff"
uv run ruff check .
# Run mypy
@mypy:
uv run mypy llm
# Rebuild docs with cog
@cog:
uv run cog -r -p "import sys, os; sys._called_from_test=True; os.environ['LLM_USER_PATH'] = '/tmp'" docs/**/*.md docs/*.md README.md
# Serve live docs on localhost:8000
@docs: cog
rm -rf docs/_build
cd docs && uv run make livehtml
# Apply Black
@black:
uv run black .
# Run automatic fixes
@fix: cog
uv run ruff check . --fix
uv run black .
# Push commit if tests pass
@push: test lint
git push