-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (43 loc) · 1.3 KB
/
Copy pathMakefile
File metadata and controls
52 lines (43 loc) · 1.3 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
.PHONY: help install update clean lint format fix hooks
help:
@echo "Available commands:"
@echo " make install - Install package and lm-polygraph dev"
@echo " make update - Update lm-polygraph to latest dev"
@echo " make hooks - Install pre-commit hooks"
@echo " make fix - Auto-fix all issues (format + run hooks)"
@echo " make format - Format code (black + isort)"
@echo " make lint - Run linters (flake8)"
@echo " make clean - Remove build artifacts"
install:
@./setup.sh
update:
@./setup.sh --update
hooks:
@echo "Installing pre-commit hooks..."
@pip install pre-commit
@pre-commit install
@echo "✓ Hooks installed. They will run on git commit."
lint:
@echo "Running flake8..."
@flake8 thinkbooster scripts service_app
format:
@echo "Formatting with black..."
@black thinkbooster scripts service_app
@echo "Sorting imports with isort..."
@isort thinkbooster scripts service_app
@echo "✓ Code formatted"
fix:
@echo "Auto-fixing all issues..."
@pre-commit run --all-files || true
@echo "✓ Done! Check 'make lint' for remaining issues."
test:
pytest tests/ -v
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
rm -rf .pytest_cache
rm -rf .coverage
rm -rf htmlcov/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete