-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (44 loc) · 931 Bytes
/
Makefile
File metadata and controls
56 lines (44 loc) · 931 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
52
53
54
55
56
project_dir := .
bot_dir := bot
.PHONY: docker-run
docker-run:
@docker-compose up -d
# Start Bot
.PHONY: start
start:
@poetry run python -m $(bot_dir)
# Install for dev
.PHONY: install-dev
install-dev:
@poetry install
@poetry run pre-commit install
# Install on host
.PHONY: install
install:
@poetry install --only main
# Lint code
.PHONY: mypy
mypy:
@poetry run mypy --strict --pretty --explicit-package-bases --install-types bot/ tests/
.PHONY: ruff
ruff:
@poetry run ruff check bot/ tests/ --fix --respect-gitignore
.PHONY: lint
lint: ruff mypy
.PHONY: tests
tests:
@poetry run pytest tests/*
# Database
.PHONY: migration
migration:
@poetry run alembic revision \
--autogenerate \
--rev-id $(shell poetry run python migrations/_get_next_revision_id.py) \
--message $(message)
# Migrate
.PHONY: migrate
migrate:
@poetry run alembic upgrade head
.PHONY: stamp
stamp:
@poetry run alembic stamp head