-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (38 loc) · 1.09 KB
/
justfile
File metadata and controls
49 lines (38 loc) · 1.09 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
# Generate, format, typecheck and test code
all: codegen format typecheck test doctest
# Run all checks (for CI)
check: check-codegen check-format typecheck
# Run code generation
codegen:
uv run cog --check @codegen.txt || uv run cog -r @codegen.txt
# Check that generated code is up to date
check-codegen:
uv run cog --check @codegen.txt
# Lint and format all code
format:
uv run ruff check --fix
uv run ruff format
# Check that code is linted and formatted
check-format:
uv run ruff check
uv run ruff format --check --diff
# Run typechecker
typecheck:
uv run pyright
# Run tests and measure code coverage
test:
uv run coverage run -m pytest
uv run coverage report
uv run coverage html
# Test examples in Sphinx documentation
test-docs:
cd docs && make doctest
# Build Sphinx documentation
docs: test-docs
cd docs && make clean html
# Run doctests
doctest:
uv run python -m doctest -o ELLIPSIS README.md
# Run tests when code changes (requires "watchexec")
watch:
watchexec -w src -w tests -e py -c -- 'uv run pytest --exitfirst --failed-first'