-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (44 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
48
49
50
51
52
53
54
PACKAGE="pycran"
.DEFAULT_GOAL:=help
.PHONY: help
help:
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
.PHONY: tests
tests:
@pytest --cov-report html:htmlcov --cov=$(PACKAGE)
.PHONY: install
install: clean
@pip install .
.PHONY: develop
develop: clean
@pip install .[dev,test]
.PHONY: uninstall
uninstall: clean
@pip uninstall $(PACKAGE)
.PHONY: clean
clean: clean-build clean-test
.PHONY: clean-build
clean-build:
@rm -fr build/
@rm -fr dist/
@rm -fr .eggs/
@find . -name '*.egg-info' -exec rm -fr {} +
@find . -name '*.egg' -exec rm -f {} +
.PHONY: clean-test
clean-test:
@rm -f .coverage
@rm -fr htmlcov/
@rm -fr .mypy_cache
@rm -fr .pytest_cache
.PHONY: lint
lint:
@echo "Running code-style check..."
@isort --check-only -rc pycran tests
@black --check pycran tests
@echo "Running static-type checker..."
@mypy pycran tests
.PHONY: format
format:
@isort -ac -rc pycran tests
@black pycran tests
@mypy pycran tests