-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (16 loc) · 1.04 KB
/
Makefile
File metadata and controls
21 lines (16 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Inspired by: https://blog.mathieu-leplatre.info/tips-for-your-makefile-with-python.html
# https://www.thapaliya.com/en/writings/well-documented-makefiles/
.DEFAULT_GOAL := help
PRE_COMMIT_HOOKS_IN_PIPELINE = \
check-added-large-files check-ast check-json check-merge-conflict check-toml check-xml check-yaml \
detect-private-key end-of-file-fixer trailing-whitespace ruff ruff-format yesqa poetry-check update-readme-title
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-25s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
.PHONY: install
install: ## Install the package for development along with pre-commit hooks.
poetry install --with dev --with test
poetry run pre-commit install
.PHONY: clean
clean: ## Clean up the project directory removing __pycache__, .coverage, test results, etc.
find . -type d -name "__pycache__" | xargs rm -rf {};
rm -rf coverage.xml test-output.xml test-results.xml htmlcov .pytest_cache .ruff_cache