-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
31 lines (23 loc) · 1 KB
/
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
.PHONY: .ALWAYS
.ALWAYS:
.DEFAULT_GOAL := help
help: ## Print all targets
@echo "\033[1mUsage:\033[0m make <target>"
@echo "\033[1mAvailable targets\033[0m"
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-30s\033[0m %s\n", $$1, $$2}' | egrep -v '^[^#]+/' | sort; true
black: .ALWAYS ## Runs black formatting
poetry run black .
cleanup: .ALWAYS ## Removes .ipynb_checkpoint, .pytest_cache, and __pycache__ folders and .coverage files
find . -type d -name '.ipynb_checkpoints' -exec rm -r {} +
find . -type d -name '.pytest_cache' -exec rm -r {} +
find . -type d -name '*pycache*' -exec rm -r {} +
find . -type d -name '.mypy_cache' -exec rm -r {} +
find . -type f -name '.coverage' -exec rm -r {} +
find . -type f -name '.coverage.*' -exec rm -r {} +
format: .ALWAYS ## Runs isort and black formatting
poetry run isort .
poetry run black .
mypy: .ALWAYS ## Runs mypy
poetry run mypy . --ignore-missing-imports
pytest: .ALWAYS ## Runs pytest
poetry run pytest