-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 714 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (26 loc) · 714 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
.PHONY: install dev config test lint format typecheck check docker-build docker-run
PYTHON ?= python
IMAGE ?= snapshot:latest
PORT ?= 3000
install:
$(PYTHON) -m pip install --upgrade pip
$(PYTHON) -m pip install -e ".[dev]"
dev:
$(PYTHON) -m uvicorn snapshot.main:app --reload --host 0.0.0.0 --port $(PORT)
config:
$(PYTHON) -m snapshot config
test:
$(PYTHON) -m pytest
lint:
$(PYTHON) -m ruff check .
$(PYTHON) -m black --check .
format:
$(PYTHON) -m ruff check . --fix
$(PYTHON) -m black .
typecheck:
$(PYTHON) -m mypy
check: lint typecheck test
docker-build:
docker build -t $(IMAGE) .
docker-run:
docker run --rm --env-file .env -p $(PORT):$(PORT) -v "$(CURDIR)/data:/app/data" $(IMAGE)