-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (26 loc) · 911 Bytes
/
Makefile
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
.DEFAULT_GOAL := help
.PHONY: venv install fmt clean help test jupyter
venv:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python '3.12'
install: venv ## Install dependencies and setup environment
uv pip install --upgrade pip
uv sync --dev --frozen
fmt: venv ## Format and lint code
uv pip install pre-commit
uv run pre-commit install
uv run pre-commit run --all-files
clean: ## Clean build artifacts and stale branches
git clean -X -d -f
git branch -v | grep "\[gone\]" | cut -f 3 -d ' ' | xargs git branch -D
test: install ## Run tests
uv pip install pytest
uv run pytest src/tests
help: ## Show this help message
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
jupyter: install ## Install a run a Jupyter Lab server
uv pip install jupyterlab
uv run jupyter lab