Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (59 loc) · 1.78 KB
/
Copy pathMakefile
File metadata and controls
77 lines (59 loc) · 1.78 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
77
SHELL = /bin/bash
default: help
.PHONY: colima
colima:
colima status || colima start
.PHONY: test
test: colima ## Run tests
uv run pytest tests/unit/ tests/integration/
.PHONY: coverage
coverage: colima ## Test coverage report
uv run pytest --cov src/mbtest --cov-report=term-missing
.PHONY: precommit-test
precommit-test: colima
uv run pytest tests/unit/ tests/integration/
uv run pytest --cov src/mbtest --cov-report=term-missing
.PHONY: lint
lint: check-format ## Lint code
.PHONY: extra-lint
extra-lint: typecheck ## Extra, optional linting.
.PHONY: typecheck
typecheck:
uv run pyright src/
.PHONY: check-format
check-format:
uv run ruff format . --check
uv run ruff check .
.PHONY: format
format: ## Format code
uv run ruff format .
uv run ruff check . --fix
.PHONY: docs
docs: ## Generate documentation
uv run sphinx-build docs build_docs --color -W -bhtml
.PHONY: precommit
precommit: precommit-test typecheck lint docs ## Pre-commit targets
@ python -m this
.PHONY: sync
sync: ## Install/sync dependencies
uv sync --all-groups
.PHONY: jsdeps
jsdeps:
- rm -r node_modules/ package.json package-lock.json
npm install mountebank@2.9 --omit=dev
.PHONY: clean
clean: ## Clean generated files
find . -name '*.pyc' -delete
find . -name '*.pyo' -delete
- rm -r build/ build_docs/ dist/ *.egg-info/ .cache .coverage .pytest_cache/ .mbdb/ .mypy_cache/ *.log *.pid *.svg
find . -name "__pycache__" -type d -print | xargs -t rm -r
find . -name "test-output" -type d -print | xargs -t rm -r
.PHONY: repl
repl: ## Python REPL
uv run python
.PHONY: outdated
outdated: ## List outdated dependancies
uv pip list --outdated
.PHONY: help
help: ## Show this help
@ grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1,$$2}'