-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 1.77 KB
/
Makefile
File metadata and controls
53 lines (37 loc) · 1.77 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
# Makefile for Sentiment Analysis
.PHONY: help install test lint format clean run type-check
help: ## Show available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
install: ## Install all dependencies including audio support
uv sync --extra audio --extra dev
install-audio: ## Install with audio dependencies only
uv sync --extra audio
install-dev: ## Install development dependencies with audio support
uv sync --extra dev --extra audio
test: ## Run tests with coverage
uv run python -m pytest tests/ --cov=src --cov=app --cov-report=term
lint: ## Check and fix code quality
uv run ruff check --fix ./src ./app ./tests
uv run ruff format ./src ./app ./tests
type-check: ## Run mypy type checking
uv run mypy src/ app/ tests/
type-check-strict: ## Run mypy with strict mode
uv run mypy --strict src/ app/
format: ## Format code only
uv run ruff format ./src ./app ./tests
format-check: ## Check if code needs formatting (without changing files)
uv run ruff format --check ./src ./app ./tests
run: ## Run the Dash application
uv run python app/voice_to_text_app.py
pre-commit-install: ## Install pre-commit hooks
uv run pre-commit install
pre-commit: ## Run pre-commit hooks on all files (excluding format)
SKIP=ruff-format uv run pre-commit run --all-files
pre-commit-format: ## Run pre-commit including manual formatting stage
uv run pre-commit run --all-files --hook-stage manual
pre-commit-full: ## Run all pre-commit hooks including formatting
uv run pre-commit run --all-files --hook-stage manual --hook-stage commit
clean: ## Remove temporary files
find . -name "__pycache__" -type d -exec rm -rf {} +
find . -name "*.pyc" -delete
rm -rf .coverage htmlcov/ .pytest_cache/