-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
30 lines (24 loc) · 789 Bytes
/
Makefile
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
.DEFAULT_GOAL := help
SHELL=bash
.PHONY: fmt
fmt: ## Run autoformatting and linting
@poetry run pre-commit run --all-files
.PHONY: test
test: ## Run tests
@poetry run pytest
.PHONY: coverage
coverage: ## Run tests and report coverage
@poetry run coverage run -m pytest
@poetry run coverage report
.PHONY: clean
clean: ## Clean up caches and build artifacts
@rm -rf .mypy_cache/
@rm -rf .pytest_cache/
@rm -rf .ruff_cache/
@rm -rf .venv/
@rm -f .coverage
@find . -type f -name '*.py[co]' -delete -or -type d -name __pycache__ -delete
.PHONY: help
help: ## Display this help screen
@echo -e "\033[1mAvailable commands:\033[0m"
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort