-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (35 loc) · 745 Bytes
/
Makefile
File metadata and controls
51 lines (35 loc) · 745 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
42
43
44
45
46
47
48
49
50
51
SHELL := /bin/bash
.ONESHELL:
PY := python
PIP := pip
# Load env if present
ifneq (,$(wildcard .env))
include .env
export
endif
.PHONY: setup run fmt lint type test revision migrate up down logs alembic
setup:
$(PY) -m venv .venv && source .venv/bin/activate && $(PIP) install -r requirements.txt
pre-commit install
run:
uvicorn app.main:app --reload --host $${APP_HOST:-127.0.0.1} --port $${APP_PORT:-8000}
fmt:
ruff format .
lint:
ruff check .
type:
mypy app
test:
pytest -q
revision:
alembic revision --autogenerate -m "$${m:-changes}"
migrate:
alembic upgrade head
up:
docker compose up -d --build
down:
docker compose down -v
logs:
docker compose logs -f --tail=200
openapi:
$(PY) scripts/export_openapi.py