-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (35 loc) · 1.14 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
VENV_PATH = venv
help:
@echo "Thanks for your interest in the Dialog Flow Engine!"
@echo
@echo "make lint: Run linters"
@echo "make test: Run basic tests (not testing most integrations)"
@echo "make test-all: Run ALL tests (slow, closest to CI)"
@echo "make format: Run code formatters (destructive)"
@echo
venv:
python3 -m venv $(VENV_PATH)
$(VENV_PATH)/bin/pip install -r requirements.txt
$(VENV_PATH)/bin/pip install -r requirements_dev.txt
$(VENV_PATH)/bin/pip install -r requirements_test.txt
format: venv
@$(VENV_PATH)/bin/python -m black --line-length=120 .
.PHONY: format
check: lint test
.PHONY: check
lint: venv
@set -e && $(VENV_PATH)/bin/python -m black --line-length=120 --check . || ( \
echo "================================"; \
echo "Bad formatting? Run: make format"; \
echo "================================"; \
false)
.PHONY: lint
test: venv
@$(VENV_PATH)/bin/python -m pytest --cov-report html --cov-report term --cov=df_engine tests/
.PHONY: test
test_all: venv test lint
`.PHONY: test_all
build_doc:
sphinx-build -M clean docs/source docs/build
sphinx-build -M html docs/source docs/build
`.PHONY: build_doc