1+ SHELL =/usr/bin/env bash
2+ # Minimal Makefile for OpenHands V1
3+
4+ # ANSI color codes
5+ GREEN =$(shell tput -Txterm setaf 2)
6+ YELLOW =$(shell tput -Txterm setaf 3)
7+ BLUE =$(shell tput -Txterm setaf 6)
8+ RESET =$(shell tput -Txterm sgr0)
9+
10+ # Install all dependencies
11+ install :
12+ @echo " $( YELLOW) Installing dependencies with uv...$( RESET) "
13+ @uv sync --dev
14+ @echo " $( GREEN) Dependencies installed successfully.$( RESET) "
15+
16+ # Setup pre-commit hooks
17+ setup-hooks :
18+ @echo " $( YELLOW) Setting up pre-commit hooks...$( RESET) "
19+ @uv run pre-commit install
20+ @echo " $( GREEN) Pre-commit hooks installed successfully.$( RESET) "
21+
22+ # Format code using uv format
23+ format :
24+ @echo " $( YELLOW) Formatting code with uv format...$( RESET) "
25+ @uv run --with ruff ruff format .
26+ @echo " $( GREEN) Code formatted successfully.$( RESET) "
27+
28+ # Lint code
29+ lint :
30+ @echo " $( YELLOW) Linting code with ruff...$( RESET) "
31+ @uv run ruff check .
32+ @echo " $( GREEN) Linting completed.$( RESET) "
33+
34+ # Run linting and formatting
35+ check : lint format
36+
37+ # Full setup: install deps and setup hooks
38+ setup : install setup-hooks
39+ @echo " $( GREEN) Setup completed successfully.$( RESET) "
40+
41+ # Clean up cache and build artifacts
42+ clean :
43+ @echo " $( YELLOW) Cleaning up...$( RESET) "
44+ @rm -rf .ruff_cache __pycache__ .pytest_cache
45+ @find . -name " *.pyc" -delete
46+ @find . -name " *.pyo" -delete
47+ @echo " $( GREEN) Cleanup completed.$( RESET) "
48+
49+ # Help
50+ help :
51+ @echo " $( BLUE) OpenHands V1 Makefile$( RESET) "
52+ @echo " Available targets:"
53+ @echo " $( GREEN) install$( RESET) - Install Python dependencies with uv"
54+ @echo " $( GREEN) setup-hooks$( RESET) - Setup pre-commit hooks"
55+ @echo " $( GREEN) format$( RESET) - Format code with uv format"
56+ @echo " $( GREEN) lint$( RESET) - Lint code with ruff"
57+ @echo " $( GREEN) check$( RESET) - Run lint and format"
58+ @echo " $( GREEN) setup$( RESET) - Full setup (install + hooks)"
59+ @echo " $( GREEN) clean$( RESET) - Clean up cache files"
60+ @echo " $( GREEN) help$( RESET) - Show this help message"
61+
62+ .PHONY : install setup-hooks format lint check setup clean help
0 commit comments