File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,21 +7,28 @@ CLEAN_FILES := *.pyc
77help: ## Display available commands
88 @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
99
10- check: ## Verify required tools are available
10+ check: ## Verify required tools and Git repository
1111 @set -eu; \
12+ if ! git rev-parse --git-dir >/dev/null 2>&1 ; then \
13+ printf "ERROR: Not a Git repository — run 'git init' first\n" >&2 ; \
14+ exit 1; \
15+ fi
1216 for cmd in uv pre-commit; do \
1317 if ! command -v "$$cmd" >/dev/null 2>&1 ; then \
1418 printf "ERROR: %s missing — install it\n" "$$cmd" >&2 ; \
1519 exit 1; \
1620 fi; \
17- done
21+ done; \
1822
1923install: check ## Install project dependencies
20- @pre-commit install
21- @uv sync --extra dev
24+ @printf "Installing pre-commit hooks...\n"
25+ @pre-commit install || { printf "ERROR: pre-commit installation failed\n" >&2 ; exit 1; }
26+ @printf "Installing project dependencies...\n"
27+ @uv sync --extra dev || { printf "ERROR: uv sync failed\n" >&2 ; exit 1; }
28+ @printf "\u2713 Installation complete\n"
2229
2330{% if "pytest" in dev_deps -%}
24- test: ## Run all unit tests
31+ test: check ## Run all unit tests
2532 @set -eu; \
2633 if [[ ! -d ".venv" ]]; then \
2734 printf "ERROR: .venv not found — run 'make install' first\n" >&2 ; \
You can’t perform that action at this time.
0 commit comments