-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjustfile
More file actions
52 lines (40 loc) · 1.24 KB
/
justfile
File metadata and controls
52 lines (40 loc) · 1.24 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
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# Run all checks: lint, typecheck, test, doctest
check: lint typecheck test doctest
# Build package (after typecheck and test)
build: typecheck test
uv build
# Lint with ruff
lint:
uv run ruff check src
# Auto-fix formatting
format:
uv run ruff format src
# Run tests
test:
uv run pytest --disable-warnings
# Type check with mypy
typecheck:
uv run mypy src/ --config-file pyproject.toml
# Run doctests in metrics.py
doctest:
uv run pytest src/modelskill/metrics.py --doctest-modules
# Generate HTML coverage report
coverage:
uv run pytest --cov-report html --cov=src tests/
# Build documentation
[unix]
docs:
cd docs && uv run quartodoc build && uv run quarto render
test -f docs/_site/index.html || { echo "Error: index.html not found."; exit 1; }
[windows]
docs:
cd docs; uv run quartodoc build; uv run quarto render
if (!(Test-Path docs/_site/index.html)) { Write-Error "Error: index.html not found."; exit 1 }
# Clean build artifacts
[unix]
clean:
rm -rf .pytest_cache .mypy_cache .coverage dist docs/_site
[windows]
clean:
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue .pytest_cache, .mypy_cache, .coverage, dist, docs/_site