-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (53 loc) · 3.02 KB
/
Copy pathMakefile
File metadata and controls
71 lines (53 loc) · 3.02 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
# Matilda Voice Development Makefile
.PHONY: help test test-cov test-fast lint format format-check type-check quality clean install dev unit integration config-tests audio-tests
PY ?= python3
help: ## Show this help message
@echo "Matilda Voice Development Commands:"
@echo "===================================="
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
test: ## Run all tests
@./scripts/test.py all --force
test-cov: ## Run tests with coverage report
@./scripts/test.py all --coverage --force
test-fast: ## Run tests quickly (no coverage)
@./scripts/test.py unit --force
lint: ## Run linting with ruff
@echo "Running linter..."
@$(PY) -c "import ruff" 2>/dev/null || (echo "ruff is not installed. Install dev deps: python3 -m pip install -e '.[dev]'"; exit 1)
@# cli.py is generated by Goobits; lint the source-of-truth instead (goobits.yaml/app_hooks.py).
@$(PY) -m ruff check src/matilda_voice/ tests/ --extend-exclude src/matilda_voice/cli.py
format: ## Format code with black
@echo "Formatting code..."
@$(PY) -c "import black" 2>/dev/null || (echo "black is not installed. Install dev deps: python3 -m pip install -e '.[dev]'"; exit 1)
@# cli.py is generated by Goobits; format the source-of-truth instead (goobits.yaml/app_hooks.py).
@$(PY) -m black src/matilda_voice/ tests/ --line-length 120 --force-exclude 'cli\.py$$'
format-check: ## Check formatting (non-mutating)
@echo "Checking format..."
@$(PY) -c "import black" 2>/dev/null || (echo "black is not installed. Install dev deps: python3 -m pip install -e '.[dev]'"; exit 1)
@# cli.py is generated by Goobits; check source-of-truth formatting instead.
@$(PY) -m black src/matilda_voice/ tests/ --line-length 120 --check --force-exclude 'cli\.py$$'
type-check: ## Run type checking with mypy
@echo "Running type checker..."
@$(PY) -c "import mypy" 2>/dev/null || (echo "mypy is not installed. Install dev deps: python3 -m pip install -e '.[dev]'"; exit 1)
@# cli.py is generated by Goobits; type-check the source-of-truth instead (goobits.yaml/app_hooks.py).
@$(PY) -m mypy src/matilda_voice/ --exclude 'cli\.py$$'
quality: format-check lint type-check ## Run all code quality checks
@echo "All quality checks completed!"
clean: ## Clean up build artifacts and cache
@echo "Cleaning up..."
@rm -rf __pycache__ .pytest_cache .mypy_cache .coverage htmlcov
@rm -rf .artifacts/htmlcov
@find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
@find . -type f -name "*.pyc" -delete
install: ## Install package with pipx
@./scripts/setup.sh install
dev: ## Install in development mode
@./scripts/setup.sh install --dev
unit: ## Run unit tests only
@$(PY) -m pytest tests/ -m "unit or not integration" -v
integration: ## Run integration tests only
@$(PY) -m pytest tests/ -m "integration" -v
config-tests: ## Run configuration tests only
@$(PY) -m pytest tests/test_config.py -v
audio-tests: ## Run audio utility tests only
@$(PY) -m pytest tests/test_audio_utils.py -v