-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
49 lines (42 loc) · 1.12 KB
/
Copy pathmakefile
File metadata and controls
49 lines (42 loc) · 1.12 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
# Makefile for ML-Project
# ---------------------------------
# Usage:
# make lint -> Run Ruff linter
# make lint-fix -> Fix lint issues automatically
# make typecheck -> Run mypy type checking
# make test -> Run pytest
# make cz-check -> Validate commit message (Commitizen)
# make cz-branch -> Validate branch with Commitizen
# make all -> Run lint, typecheck, and tests
# Variables
UV = uv
# ---------------------------------
# Linting
lint:
@echo "Running Ruff..."
$(UV) run ruff check .
@echo "---------------"
lint-fix:
@echo "Running Ruff with fix..."
$(UV) run ruff check --fix .
@echo "---------------"
# ---------------------------------
# Type Checking
typecheck:
@echo "Running Mypy..."
$(UV) run mypy auto_ml/ notebooks/ tests/
@echo "---------------"
# ---------------------------------
# Testing
test:
@echo "Running pytest..."
$(UV) run pytest
@echo "---------------"
#----------------------------------
# Make commit
commit:
$(UV) run cz commit
# ---------------------------------
# Run all pre-commit style checks
check_all: lint typecheck test
@echo "All checks passed!"