-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 950 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
.PHONY: style test ci_check envup run db_revision
VENV_BIN_PATH = ./.venv/bin
PYTHONPATH = $(shell pwd)
SOURCE_DIR = ./source/
envup:
$(VENV_BIN_PATH)/pip3 install -c ${SOURCE_DIR}constraints-pre.txt -r ${SOURCE_DIR}requirements-pre.txt
$(VENV_BIN_PATH)/pip3 install -c ${SOURCE_DIR}constraints.txt -r ${SOURCE_DIR}requirements.txt
$(VENV_BIN_PATH)/pip3 install -c ${SOURCE_DIR}constraints-dev.txt -r ${SOURCE_DIR}requirements-dev.txt
style:
$(VENV_BIN_PATH)/flake8 core
$(VENV_BIN_PATH)/flake8 --ignore=D tests
test:
$(VENV_BIN_PATH)/python3 -m pytest --verbose tests/
xtest:
$(VENV_BIN_PATH)/python3 -m pytest -x tests/
ci_check: style test
run:
PYTHONPATH=$(PYTHONPATH) $(VENV_BIN_PATH)/uvicorn core.app:app --reload --workers 1 --host 0.0.0.0 --port 8095
db_revision:
PYTHONPATH=$(PYTHONPATH) $(VENV_BIN_PATH)/alembic revision --autogenerate -m "${m}"
db_migrate:
PYTHONPATH=$(PYTHONPATH) $(VENV_BIN_PATH)/alembic upgrade head