-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (59 loc) · 2.34 KB
/
Copy pathMakefile
File metadata and controls
76 lines (59 loc) · 2.34 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
74
75
76
.PHONY: sync test test-cov test-ci cov-report cov lint-typing lint-style lint-fmt lint-check lint-typos lint-all security-bandit security-audit security clean help
help:
@echo "Available make targets:"
@echo " make sync - Sync project and install dependencies"
@echo " make test - Run unit tests"
@echo " make test-cov - Run tests with coverage collection"
@echo " make test-ci - Run tests with coverage + XML/junit output for CI"
@echo " make cov-report - Generate coverage reports (xml, html)"
@echo " make cov - Run tests and generate coverage reports"
@echo " make lint-typing - Type check with mypy"
@echo " make lint-style - Lint with ruff (check only)"
@echo " make lint-fmt - Format code and lint with auto-fixes"
@echo " make lint-check - Check formatting and lint without modifying files"
@echo " make lint-typos - Check for typos"
@echo " make lint-all - Run formatting, linting, and type checking"
@echo " make security-bandit - Run Bandit security scan"
@echo " make security-audit - Run pip-audit dependency vulnerability scan"
@echo " make security - Run all security scans"
@echo " make clean - Clean build artifacts and cache"
sync:
uv sync --all-groups
test:
uv run pytest tests -m "not integration"
test-cov:
uv run pytest tests -m "not integration" --cov=src --cov-report=term-missing
test-ci:
uv run pytest tests -m "not integration" \
--cov=src/rankers \
--cov-report=xml \
--cov-report=term-missing \
--junitxml=pytest-results.xml -v
cov-report:
uv run coverage xml
uv run coverage html
cov: test-cov cov-report
lint-typing:
uv run mypy src/
lint-style:
uv run ruff check .
lint-fmt:
uv run ruff check --fix --unsafe-fixes .
uv run ruff format .
lint-check:
uv run ruff check .
uv run ruff format --check .
lint-typos:
uv run typos
lint-all: lint-fmt lint-typing
security-bandit:
uv run bandit -c pyproject.toml -r src/
security-audit:
uv run pip-audit --desc
security: security-bandit security-audit
clean:
rm -rf .coverage coverage.xml htmlcov dist build *.egg-info
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type d -name .pytest_cache -exec rm -rf {} +
find . -type d -name .ruff_cache -exec rm -rf {} +
find . -type d -name .mypy_cache -exec rm -rf {} +