-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (37 loc) · 1.06 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show help information
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
.PHONY: init
init: ## Initialize project
poetry install
poetry run pre-commit install
.PHONY: lint
lint: ## Code analyse and lint
poetry run pylint src/ tests/
.PHONY: test
test: ## Run tests
poetry run pytest --cov=src --cov-report=term-missing
.PHONY: tox
tox: ## Run tox
poetry run tox
.PHONY: build
build: ## Build project
poetry build
.PHONY: dist
dist: ## Bundle project with pyinstaller
rm -rf build/ dist/
poetry run pyinstaller aliros.spec
cp {CHANGELOG.md,LICENSE,README.md} dist/
.PHONY: publish
publish: build ## Publish project
poetry publish --build
.PHONY: codecov
codecov: ## Upload coverage.xml to codecov.com
poetry run pytest --cov=src --cov-report=xml
codecov
.PHONY: clean
clean: ## Clean up cache files
find . -name '__pycache__' -type d | xargs rm -rf
rm -rf .pytest_cache/ .tox/ build/ dist/
rm -f .coverage coverage.xml .python_version