-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
35 lines (25 loc) · 899 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
VENV = venv/bin
.DEFAULT_GOAL := help
.PHONY: clean venv help
clean: ## Remove Python file artifacts and virtualenv
@rm -rf venv
venv: ## Creates the virtualenv and installs requirements
python -m venv venv
$(VENV)/pip install tox
test:venv ## Run tests
$(VENV)/tox -qe test
lint:venv ## Lint source
$(VENV)/tox -qe lint
ci:test lint ## Continuous Integration Commands
docs:test ## Generate documentation site
$(VENV)/tox -qe docs
@cp test-reports/test-report.html site/
@cp -R test-reports/coverage_html site/coverage
package:docs ## Package project
$(VENV)/tox -qe package
serve:venv ## Serve documentation site
@cp test-reports/test-report.html site/
@cp -R test-reports/coverage_html site/coverage
$(VENV)/tox -qe docs -- serve
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}'