-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (65 loc) · 1.44 KB
/
Makefile
File metadata and controls
80 lines (65 loc) · 1.44 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.PHONY: certs
certs:
mkdir certs
openssl genrsa -out certs/jwt-private.pem 2048
openssl rsa -in certs/jwt-private.pem -pubout -out certs/jwt-public.pem
.PHONY: deps
deps:
docker compose up fastid-db fastid-redis -d
.PHONY: up
up:
docker compose up --build --remove-orphans --wait
.PHONY: up-prod
up-prod:
docker compose -f docker-compose.yml -f docker-compose-prod.yml up --build --remove-orphans --wait
.PHONY: test
test:
pytest . -x -s -v --ff -m 'not slow'
.PHONY: testcov
testcov:
coverage run -m pytest -x --ff -m 'not slow'
coverage combine
coverage report --show-missing --skip-covered --sort=cover --precision=2
coverage html
rm .coverage*
.PHONY: stop
stop:
docker compose stop
.PHONY: down
down:
docker compose down
.PHONY: restart
restart:
docker compose restart
.PHONY: lint
lint:
@echo "Running ruff linter (isort, flake, pyupgrade, etc. replacement)..."
ruff check . --fix
@echo "Running ruff formatter (black replacement)..."
ruff format .
@echo "Running codespell to find typos..."
codespell .
.PHONY: static
static:
@echo "Running mypy..."
mypy .
.PHONY: check
check:
pre-commit run
.PHONY: generate
generate: deps
alembic revision -m "$(NAME)" --autogenerate
alembic upgrade head
alembic downgrade -1
alembic upgrade head
alembic downgrade -1
PHONY: upgrade
upgrade: deps
alembic upgrade head
PHONY: downgrade
downgrade: deps
alembic downgrade -1
# Windows only
PHONY: kill
kill:
TASKKILL /F /IM python.exe