-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (66 loc) · 2.34 KB
/
Copy pathMakefile
File metadata and controls
79 lines (66 loc) · 2.34 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
# orelhIA Makefile
# https://github.com/evandrodevbr/orelhIA
#
# One-liner: `make dev`
# Single command: `uv sync --extra dev --extra record && uv run python -m parakeet_bootstrap`
.PHONY: help install dev test lint format clean run cli bootstrap health all
# Default: show help
help:
@echo "orelhIA — Makefile"
@echo ""
@echo "Comandos disponíveis:"
@echo " make install — instala deps (uv sync, requer uv instalado)"
@echo " make dev — install + bootstrap container + sanity test"
@echo " make test — roda pytest"
@echo " make lint — roda ruff check"
@echo " make format — roda ruff format"
@echo " make clean — remove cache/build artifacts"
@echo " make run — roda MCP server (stdio, pra usar com pi)"
@echo " make cli — roda CLI standalone (uso direto no terminal)"
@echo " make bootstrap — instala Docker + container Parakeet (idempotente)"
@echo " make health — checa status do backend"
@echo " make all — dev + test + lint"
@echo ""
@echo "Variáveis:"
@echo " PYTHON=python3.12 uv=0.11.7"
# Install deps via uv (modern Python package manager)
install:
uv sync --extra dev --extra record
# Full dev setup: install + bootstrap container + smoke test
dev: install bootstrap
@echo ""
@echo "✅ Setup completo!"
@echo " Para usar via MCP, adicione ao ~/.pi/agent/mcp.json:"
@echo " { \"mcpServers\": { \"orelhIA\": { ... } } }"
@echo ""
@echo " Para testar standalone:"
@echo " uv run python -m orelhIA.cli audio.ogg -l pt"
# Test
test:
uv run pytest tests/ -v
# Lint
lint:
uv run ruff check server.py parakeet_bootstrap.py orelhIA/ tests/
# Format
format:
uv run ruff format server.py parakeet_bootstrap.py orelhIA/ tests/
# Clean artifacts
clean:
rm -rf .pytest_cache .ruff_cache __pycache__ */__pycache__ */*/__pycache__
rm -rf .venv dist build *.egg-info
# Run MCP server (stdio)
run:
uv run python -m orelhIA
# Run CLI standalone: make cli AUDIO=audio.ogg
cli:
uv run python -m orelhIA.cli $(AUDIO) -l $(LANG)
# Install Docker + run container (idempotent)
bootstrap:
uv run python -m parakeet_bootstrap
# Health check on backend
health:
uv run python -c "import orelhIA; h = orelhIA.health(); print('ok:', h.get('ok')); print('models:', h.get('models', []))"
# Run all checks
all: dev test lint
@echo ""
@echo "✅ All checks passed!"