-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
55 lines (39 loc) · 951 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
47
48
49
50
51
52
53
54
55
.PHONY: clean init
init: clean
pipenv install --dev
pipenv run pre-commit install
service_up:
docker-compose up -d postgres
service_down:
docker-compose down && docker volume rm postgres_data
analysis: bandit mypy
bandit:
pipenv run bandit model/
mypy:
pipenv run mypy model/
reformat: isort black
black:
pipenv run black model/schema
isort:
pipenv run isort model/schema
lint: flake8 pylint
flake8:
pipenv run flake8 model/schema --max-line-length=120
pylint:
pipenv run pylint --rcfile=setup.cfg model/schema
ci-bundle: analysis reformat lint
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
model_migrate:
cd model/ && pipenv run alembic upgrade heads
model_revision:
cd model && pipenv run alembic revision --autogenerate -m "migration"