-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
41 lines (31 loc) · 773 Bytes
/
Copy pathmakefile
File metadata and controls
41 lines (31 loc) · 773 Bytes
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
APP = api
.PHONY: clean init
init: clean
cp env-sample .env
poetry env use python3.8
poetry install
migrate:
poetry run alembic -c api/alembic.ini upgrade head
revision:
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 lint test
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