-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (37 loc) · 1.04 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
REQUIREMENTS_DIR := requirements
FUNCTIONAL_TESTS_DIR := tests/functional
PIP_COMPILE_ARGS := --generate-hashes --allow-unsafe --no-header --no-emit-index-url --verbose
PIP_COMPILE := cd $(REQUIREMENTS_DIR) && pip-compile $(PIP_COMPILE_ARGS)
PIP_SYNC_ARGS := --no-deps
.PHONY: fix
fix:
isort .
.PHONY: lint
lint:
ec
flake8
isort -qc .
.PHONY: test
test:
pytest --ignore=$(FUNCTIONAL_TESTS_DIR)
.PHONY: tf
tf:
pytest $(FUNCTIONAL_TESTS_DIR)
.PHONY: dtf
dtf:
cd $(FUNCTIONAL_TESTS_DIR) && docker-compose up test
.PHONY: check
check: lint test
.PHONY: compile-requirements
compile-requirements:
pip install pip-tools
$(PIP_COMPILE) requirements.in
$(PIP_COMPILE) requirements.lint.in
$(PIP_COMPILE) requirements.test.in
$(PIP_COMPILE) requirements.dev.in
test -f $(REQUIREMENTS_DIR)/requirements.local.in && $(PIP_COMPILE) requirements.local.in || exit 0
.PHONY: sync-requirements
sync-requirements:
pip install pip-tools
cd $(REQUIREMENTS_DIR) && pip-sync requirements.txt requirements.*.txt --pip-args "$(PIP_SYNC_ARGS)"
.DEFAULT_GOAL :=