-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (30 loc) · 1.11 KB
/
Makefile
File metadata and controls
41 lines (30 loc) · 1.11 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
# Makefile for the Markowitz reference implementation
# This Makefile provides commands for setting up the development environment,
# running experiments, and maintaining code quality.
.DEFAULT_GOAL := help
##@ Development Setup
uv: ## Create a virtual environment using uv
# Download and install uv package manager
@curl -LsSf https://astral.sh/uv/install.sh | sh
##@ Code Quality
.PHONY: fmt
fmt: uv ## Run autoformatting and linting
# Run all pre-commit hooks on all files
@uvx run pre-commit run --all-files
##@ Cleanup
.PHONY: clean
clean: ## Clean up caches and build artifacts
# Remove all files ignored by git
@git clean -X -d -f
##@ Experiments
.PHONY: experiments
experiments: uv ## Run all experiment
# Execute the experiments script
@uv run experiments.py
##@ Help
.PHONY: help
help: ## Display this help screen
# Display a header for the help message
@echo -e "\033[1mAvailable commands:\033[0m"
# Parse the Makefile to extract targets and their descriptions
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort