-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (46 loc) · 1.47 KB
/
Makefile
File metadata and controls
52 lines (46 loc) · 1.47 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: install
install:
# 🏗️ Installing dependencies and pre-commit hooks...
uv pip install -e .
# ✅ Dependencies installed.
pre-commit install
# ✅ Pre-commit hooks installed.
# Run linters
.PHONY: lint
lint: ensure-ruff
# 🏗️ Running linters, your files will not be mutated.
# Use 'make check' to auto-apply fixes."
ruff check
# ✅ Linting complete."
# Run formatter (if dev does not do so in their IDE)
.PHONY: format
format: ensure-ruff
# 🏗️ Running formatter, your files will be changed to comply to formatting configs.
ruff format
# display the summaries of diffs in repo, some of these diffs are generated by the formatter
git diff --stat
# ✅ Formatting complete. Please review your git diffs, if any.
# Run ruff auto lint and format via pre-commit hook
.PHONY: check
check: ensure-ruff
# 🏗️ Running pre-commit linter and formatters on files...
@(pre-commit run --all-files)
# Clean up
.PHONY: clean
clean:
# 🧼 Cleaning up venv.
rm -rf $(VENV_DIR)
# ✅ Cleaned up venv. Run 'make install' to re-generate.
# Help message
.PHONY: help
help:
# 📖 Showing available commands...
@echo "Usage: make <target>"
@echo "Targets:"
@echo " install Install dependencies and pre-commit hooks"
@echo " lint Run linters"
@echo " format Run formatter"
@echo " check Run ruff auto lint and format via pre-commit hook"
@echo " clean Clean up venv"
@echo " help Show this help message"
# ✅ Help message displayed.