-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
46 lines (35 loc) Β· 859 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
APP = /
.PHONY: clean init
init:
poetry env use python3.8
poetry install
migrate:
poetry run alembic -c api/alembic.ini upgrade head
revision:
ifndef MESSAGE
$(error MESSAGE is not set)
endif
poetry run alembic -c api/alembic.ini revision --autogenerate -m "${MESSAGE}"
lint:
poetry run flake8 ${APP}
analysis:
poetry run bandit -r ${APP}/** -c pyproject.toml
format:
poetry run black ${APP}
poetry run isort ${APP}
test:
poetry run pytest -vv --cov-report=term-missing --cov=${APP}/endpoints ${APP}/tests
ci-bundle: analysis format test
dev:
cd server && poetry run uvicorn app:APP --reload --host 0.0.0.0
clean:
find . -type f -name '*.py[co]' -delete
find . -type d -name '__pycache__' -delete
rm -rf dist
rm -rf build
rm -rf *.egg-info
rm -rf .hypothesis
rm -rf .pytest_cache
rm -rf .tox
rm -f report.xml
rm -f coverage.xml