-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (36 loc) · 995 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
init:
@pip3 install --upgrade pip setuptools wheel
@pip3 install --upgrade poetry
@poetry install
@pre-commit install
@pre-commit run --all-files
.PHONY: isort
isort:
@poetry run isort --sp pyproject.toml .
.PHONY: isort-check
isort-check:
@poetry run isort --check --sp pyproject.toml .
.PHONY: flake8
flake8:
@poetry run flake8 .
.PHONY: blue
blue:
@poetry run blue -v .
.PHONY: blue-check
blue-check:
@poetry run blue -v --check .
.PHONY: format
format: blue isort
.PHONY: lint
lint: isort-check flake8 blue-check
run:
@poetry install
@poetry run env $(shell grep -v ^\# .env | xargs) uvicorn src.main:app --reload --port 8080
test-all:
@poetry run env $(shell grep -v ^\# .env | xargs) pytest
poetry-export:
@poetry export --without-hashes --no-ansi --no-interaction --format requirements.txt --output requirements.txt
build-image: poetry-export
@docker build -t bank-accounts:latest .
run-docker: build-image
@docker run --rm -p '8080:8080' bank-accounts:latest