-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (47 loc) · 1.3 KB
/
Makefile
File metadata and controls
63 lines (47 loc) · 1.3 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
PYTHON ?= python3
PIP ?= $(PYTHON) -m pip
.PHONY: install install-dev lint format format-check typecheck test test-cov security dep-scan smoke build ci clean
install:
$(PIP) install -e .
install-dev:
$(PIP) install -e .
$(PIP) install pytest pytest-cov ruff mypy bandit safety pip-audit build twine pre-commit
lint:
ruff check .
format:
ruff format .
format-check:
ruff format --check .
typecheck:
mypy kernels implementations
test:
pytest
test-cov:
@if pytest --help 2>/dev/null | grep -q -- "--cov"; then \
pytest --cov=kernels --cov=implementations --cov-report=term-missing --cov-fail-under=80; \
else \
echo "pytest-cov not installed; running pytest without coverage"; \
pytest; \
fi
security:
@if command -v bandit >/dev/null 2>&1; then \
bandit -r kernels implementations -q; \
else \
echo "bandit not installed; skipping security scan"; \
fi
dep-scan:
safety check --full-report || true
pip-audit
smoke:
./scripts/smoke.sh
build:
@if $(PYTHON) -c "import build" >/dev/null 2>&1; then \
$(PYTHON) -m build; \
else \
echo "python-build package not installed; skipping build step"; \
fi
twine-check:
twine check dist/*
ci: lint format-check typecheck security test-cov smoke build
clean:
rm -rf .mypy_cache .pytest_cache .ruff_cache .coverage htmlcov dist build *.egg-info .tmp