Skip to content

Commit 3661741

Browse files
authored
Create Makefile for more automation and convenience (#39)
We can expand on this in future perhaps installing the pre-commit package and / or adding more targets
1 parent f96829c commit 3661741

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
PYTHON ?= python3
2+
PIP := $(PYTHON) -m pip
3+
4+
.PHONY: install i check c checkinstall ci checkupdate cu help
5+
.DEFAULT_GOAL := help
6+
7+
install i: ## Install Python dependencies from requirements.txt
8+
$(PIP) install -r requirements.txt
9+
10+
check c: ## Run pre-commit checks on all files
11+
pre-commit run --all-files
12+
13+
checkinstall ci: ## Install pre-commit hooks
14+
pre-commit install
15+
16+
checkupdate cu: ## Update pre-commit hooks to the latest version
17+
pre-commit autoupdate
18+
19+
help: ## Display this help message
20+
@echo "Usage: make <target>"
21+
@echo
22+
@echo "Available targets:"
23+
@grep -E '^[a-z]+ [a-z]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)