-
-
Notifications
You must be signed in to change notification settings - Fork 557
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (60 loc) · 1.5 KB
/
justfile
File metadata and controls
73 lines (60 loc) · 1.5 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
# List all available recipes
_default:
@just --list --unsorted
# Bootstrap dev environment: install pre-commit hooks and sync dependencies
[group('dev')]
bootstrap:
uv tool install pre-commit
uv sync
pre-commit install --install-hooks
# Run pre-commit hooks on all files
[group('dev')]
lint:
pre-commit run --all-files
# Run all checks before submitting a PR
[group('dev')]
pre-mr-check: lint ty pyrefly mypy stubtest pyright ext-test test
# Remove mypy cache
[group('dev')]
clean:
rm -rf .mypy_cache
# Run mypy on plugin, ext, scripts, stubs and tests
[group('typecheck')]
mypy:
uv run mypy --strict ext
uv run mypy --strict scripts
uv run mypy --strict mypy_django_plugin
uv run mypy --cache-dir=/dev/null --no-incremental django-stubs
uv run mypy --strict tests
# Run pyright on test cases
[group('typecheck')]
pyright:
uv run pyright
# Run pyrefly on test cases
[group('typecheck')]
pyrefly:
uv run pyrefly check tests/assert_type
# Run ty on test cases
[group('typecheck')]
ty:
uv run ty check tests/assert_type
# Run pytest tests
[group('test')]
test +args="-n auto tests":
uv run pytest {{ args }}
# Run stubtest to check stubs match runtime
[group('test')]
stubtest *args:
uv run ./scripts/stubtest.sh {{ args }}
# Run django-stubs-ext tests
[group('test')]
ext-test:
uv run pytest ext
# Build all packages
[group('build')]
build:
uv build --all-packages
# Check that uv.lock is up to date
[group('build')]
lock-check:
uv lock --check