-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (46 loc) · 1.51 KB
/
Copy pathMakefile
File metadata and controls
65 lines (46 loc) · 1.51 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
# Makefile for Utils Bot v2 development
.PHONY: help install install-dev setup lint format clean run docker-build docker-run migrate
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install: ## Install production dependencies
pip install -r requirements.txt
install-dev: ## Install development dependencies
pip install -r requirements.txt -r requirements-dev.txt
setup: install-dev ## Set up development environment
pre-commit install
make migrate
lint: ## Run linting
flake8 .
mypy .
format: ## Format code
black .
isort .
format-check: ## Check if code is formatted
black --check .
isort --check-only .
clean: ## Clean up temporary files
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type f -name "*.log" -delete
rm -rf .mypy_cache
run: ## Run the bot
python main.py
run-dev: ## Run the bot in development mode
DEVELOPMENT_MODE=true python main.py
migrate: ## Run database migrations
python migrations/init_db.py
python migrations/populate_data.py
docker-build: ## Build Docker image
docker build -t utils-bot-plus .
docker-run: ## Run with Docker Compose
docker-compose up -d
docker-stop: ## Stop Docker Compose
docker-compose down
docker-logs: ## View Docker logs
docker-compose logs -f bot
check: lint ## Run all checks
ci: format-check lint ## Run CI pipeline
dev: setup run-dev ## Set up and run in development mode