-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (46 loc) · 1.38 KB
/
Makefile
File metadata and controls
57 lines (46 loc) · 1.38 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
# Makefile for Local Ollama RAG
.PHONY: help doctor ingest query smoke test install dev-install clean build-exe
help:
@echo "Available commands:"
@echo " make install - Install the package"
@echo " make dev-install - Install with dev dependencies"
@echo " make doctor - Check Ollama health and models"
@echo " make ingest - Ingest documents and build index"
@echo " make query Q='...' - Query the index"
@echo " make smoke - Run smoke test"
@echo " make test - Run unit tests"
@echo " make build-exe - Build standalone executable"
@echo " make clean - Clean generated files"
install:
pip install -e .
dev-install:
pip install -e ".[dev]"
doctor:
python -m rag.cli $(if $(ENV),--env $(ENV)) doctor
ingest:
python -m rag.cli $(if $(ENV),--env $(ENV)) ingest
query:
@if [ -z "$(Q)" ]; then \
echo "Usage: make query Q='your question here'"; \
exit 1; \
fi
python -m rag.cli $(if $(ENV),--env $(ENV)) query "$(Q)"
smoke:
python scripts/rag_smoke.py $(if $(ENV),--env $(ENV))
test:
pytest tests/ -v
build-exe:
python build_executable.py
clean:
rm -rf index_storage/
rm -rf __pycache__/
rm -rf src/rag/__pycache__/
rm -rf tests/__pycache__/
rm -rf .pytest_cache/
rm -rf .mypy_cache/
rm -rf .ruff_cache/
rm -rf build/
rm -rf dist/
rm -rf *.spec
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete