Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(re)introduce Makefile #282

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env

This file was deleted.

55 changes: 55 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Colors for pretty output
BLUE := \033[36m
BOLD := \033[1m
RESET := \033[0m

.DEFAULT_GOAL := help

.PHONY: help verify install fmt test marimo clean

##@ Development Setup

venv:
@printf "$(BLUE)Creating virtual environment...$(RESET)\n"
@curl -LsSf https://astral.sh/uv/install.sh | sh
@uv venv --python 3.12

install: venv ## Install all dependencies using uv
@printf "$(BLUE)Installing dependencies...$(RESET)\n"
@uv sync --dev --frozen

##@ Code Quality

fmt: venv ## Run code formatting and linting
@printf "$(BLUE)Running formatters and linters...$(RESET)\n"
@uv pip install pre-commit
@uv run pre-commit install
@uv run pre-commit run --all-files

##@ Testing

test: install ## Run all tests
@printf "$(BLUE)Running tests...$(RESET)\n"
@uv pip install pytest
@uv run pytest tests

##@ Cleanup

clean: ## Clean generated files and directories
@printf "$(BLUE)Cleaning project...$(RESET)\n"
@git clean -d -X -f

##@ Marimo & Jupyter

marimo: install ## Start a Marimo server
@printf "$(BLUE)Start Marimo server...$(RESET)\n"
@uv pip install marimo
@uv run marimo edit book/marimo

##@ Help

help: ## Display this help message
@printf "$(BOLD)Usage:$(RESET)\n"
@printf " make $(BLUE)<target>$(RESET)\n\n"
@printf "$(BOLD)Targets:$(RESET)\n"
@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)
5 changes: 0 additions & 5 deletions taskfile.yml

This file was deleted.