-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (45 loc) · 1.57 KB
/
Copy pathMakefile
File metadata and controls
62 lines (45 loc) · 1.57 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
.PHONY: default install format fix ruff-check mypy-check zizmor-check check benchmark-test integration-test property-test unit-test test doc publish clean
UV := $(shell command -v uv 2>/dev/null || true)
ifeq ($(UV),)
$(warning uv not found. Install uv (curl -LsSf https://astral.sh/uv/install.sh | sh) to use Makefile targets)
endif
default:
@echo "Usage: make [install|format|fix|ruff-check|mypy-check|zizmor-check|check|benchmark-test|integration-test|property-test|unit-test|test|doc|publish|clean]"
@exit 1
install:
uv sync --all-groups --locked
format:
uv run --group quality --locked ruff format
fix:
uv run --group quality --locked ruff check --fix
uv run --group quality --locked zizmor --collect=all --no-progress --fix --persona=auditor .
ruff-check:
uv run --group quality --locked ruff check
uv run --group quality --locked ruff format --check
mypy-check:
uv run --group tests --group types --group quality --locked mypy
zizmor-check:
uv run --group quality --locked zizmor --collect=all --no-progress --persona=auditor .
check:
make ruff-check
make mypy-check
make zizmor-check
benchmark-test:
uv run --group tests --locked pytest -m perf
integration-test:
uv run --group tests --locked pytest -m integration
property-test:
uv run --group tests --locked pytest -m property
unit-test:
uv run --group tests --locked pytest -m unit
test:
uv run --group tests --locked pytest
doc:
uv run --group docs --locked sphinx-build -M html docs/source docs/build
publish:
make clean
uv build
uvx twine check dist/*
uv publish
clean:
git clean -xfd --exclude .venv