-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (52 loc) · 1.42 KB
/
Makefile
File metadata and controls
76 lines (52 loc) · 1.42 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# define the name of the virtual environment directory
VENV := .venv
TEST=
PARAMETERS=
# default target, when make executed without arguments
all: venv
$(VENV)/bin/activate:
# venv is a shortcut target
venv: $(VENV)/bin/activate
python3 -m venv $(VENV)
python3 -m pipenv shell
install:
python3 -m pip install --upgrade pipenv pip setuptools black flake8 neovim pyinstaller
python3 -m pip install --editable .
setup:
python3 -m pip install . ${PARAMETERS}
run:
python3 -m app ${PARAMETERS}
mig:
python3 -m alembic --config ./app/alembic.ini revision --autogenerate -m "initial"
mig-check:
python3 -m alembic --config ./app/alembic.ini check
mig-up:
python3 -m alembic --config ./app/alembic.ini upgrade head
build:
python3 -m pip install build
python3 -m build ${PARAMETERS}
bundle:
rm -rf dist build
pyinstaller app/manage.py --onefile --name pepper-local --add-data "app/routes/components.yaml:routes" --collect-all "aiohttp_swagger3"
test: build
python3 -m pytest ${TEST}
clean:
python3 -m pipenv --rm
rm -rf {$(VENV),build,dist,logs/*}; rm -rf .pytest_cache; find . -type f -name '*.pyc' -delete
lint:
python3 -m black ./app
python3 -m flake8 ./app
dbuild:
docker-compose build
dup:
docker-compose up -d --build
dps:
docker-compose ps
dlogs:
docker-compose logs -f --tail 15
dclean:
docker-compose down -v && docker-compose rm
dd:
docker-compose down -v postgres
ddup:
docker-compose up -d postgres