-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (30 loc) · 951 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
31
32
33
34
35
36
.PHONY: clean
## Remove unneeded files
clean:
find src -type d -name "__pycache__" -exec rm -rf {} + > /dev/null 2>&1
find src -type f -name "*.pyc" -exec rm -rf {} + > /dev/null 2>&1
find tests -type d -name "__pycache__" -exec rm -rf {} + > /dev/null 2>&1
find tests -type f -name "*.pyc" -exec rm -rf {} + > /dev/null 2>&1
.PHONY: lint
## Run linting
lint:
python -m mypy src/
pre-commit run --all-files
.PHONY: test
## Run pytest
test:
python -m pytest tests/
.PHONY: install
## Install this repo in develop mode
install:
pip install -r requirements/ci.txt -r requirements/docs.txt
pre-commit install
.PHONY: docs-build
## Build sphinx docs using projects README and module structure (sphinx-apidoc)
docs-build:
cd docs && mkdocs serve
.PHONY: help
## Print Makefile documentation
help:
@perl -0 -nle 'printf("%-25s - %s\n", "$$2", "$$1") while m/^##\s*([^\r\n]+)\n^([\w-]+):[^=]/gm' $(MAKEFILE_LIST) | sort
.DEFAULT_GOAL := help