-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (43 loc) · 1.69 KB
/
Makefile
File metadata and controls
57 lines (43 loc) · 1.69 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
.PHONY: help install test pytest lint format check clean
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
install: ## Install dependencies including dev dependencies
poetry install
test: pytest ## Run pytest tests
pytest: ## Run pytest tests
poetry run pytest tests/ -v
coverage: ## Run tests with coverage report
poetry run pytest tests/
coverage-html: ## Generate HTML coverage report
poetry run pytest tests/
@echo "Coverage report generated in htmlcov/index.html"
@echo "Open with: open htmlcov/index.html"
lint: ## Run ruff linter
poetry run ruff check .
format: ## Format code with ruff
poetry run ruff format .
format-check: ## Check formatting without making changes
poetry run ruff format --check .
type-check: ## Run mypy type checking
poetry run mypy focus_scrub/
check: ## Run all checks (lint, format-check, type-check, test)
@echo "Running lint..."
@poetry run ruff check .
@echo "\nChecking formatting..."
@poetry run ruff format --check .
@echo "\nRunning type check..."
@poetry run mypy focus_scrub/
@echo "\nRunning tests..."
@poetry run pytest tests/ -v
pre-commit-install: ## Install pre-commit hooks
poetry run pre-commit install
pre-commit-run: ## Run pre-commit on all files
poetry run pre-commit run --all-files
clean: ## Clean up cache files
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
find . -type d -name ".pytest_cache" -exec rm -rf {} +
find . -type d -name ".mypy_cache" -exec rm -rf {} +
find . -type d -name ".ruff_cache" -exec rm -rf {} +
rm -rf htmlcov/
rm -f .coverage coverage.xml