Skip to content

Commit 8f80fb1

Browse files
committed
(re)introduce Makefile
1 parent 8f0150b commit 8f80fb1

File tree

3 files changed

+55
-6
lines changed

3 files changed

+55
-6
lines changed

.env

-1
This file was deleted.

Makefile

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Colors for pretty output
2+
BLUE := \033[36m
3+
BOLD := \033[1m
4+
RESET := \033[0m
5+
6+
.DEFAULT_GOAL := help
7+
8+
.PHONY: help verify install fmt test marimo clean
9+
10+
##@ Development Setup
11+
12+
venv:
13+
@printf "$(BLUE)Creating virtual environment...$(RESET)\n"
14+
@curl -LsSf https://astral.sh/uv/install.sh | sh
15+
@uv venv --python 3.12
16+
17+
install: venv ## Install all dependencies using uv
18+
@printf "$(BLUE)Installing dependencies...$(RESET)\n"
19+
@uv sync --dev --frozen
20+
21+
##@ Code Quality
22+
23+
fmt: venv ## Run code formatting and linting
24+
@printf "$(BLUE)Running formatters and linters...$(RESET)\n"
25+
@uv pip install pre-commit
26+
@uv run pre-commit install
27+
@uv run pre-commit run --all-files
28+
29+
##@ Testing
30+
31+
test: install ## Run all tests
32+
@printf "$(BLUE)Running tests...$(RESET)\n"
33+
@uv pip install pytest
34+
@uv run pytest tests
35+
36+
##@ Cleanup
37+
38+
clean: ## Clean generated files and directories
39+
@printf "$(BLUE)Cleaning project...$(RESET)\n"
40+
@git clean -d -X -f
41+
42+
##@ Marimo & Jupyter
43+
44+
marimo: install ## Start a Marimo server
45+
@printf "$(BLUE)Start Marimo server...$(RESET)\n"
46+
@uv pip install marimo
47+
@uv run marimo edit book/marimo
48+
49+
##@ Help
50+
51+
help: ## Display this help message
52+
@printf "$(BOLD)Usage:$(RESET)\n"
53+
@printf " make $(BLUE)<target>$(RESET)\n\n"
54+
@printf "$(BOLD)Targets:$(RESET)\n"
55+
@awk 'BEGIN {FS = ":.*##"; printf ""} /^[a-zA-Z_-]+:.*?##/ { printf " $(BLUE)%-15s$(RESET) %s\n", $$1, $$2 } /^##@/ { printf "\n$(BOLD)%s$(RESET)\n", substr($$0, 5) }' $(MAKEFILE_LIST)

taskfile.yml

-5
This file was deleted.

0 commit comments

Comments
 (0)