-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (33 loc) · 1.2 KB
/
Makefile
File metadata and controls
45 lines (33 loc) · 1.2 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
.PHONY: install run app app-build app-down app-restart test clean typecheck lint logs knowledge-check
install:
poetry install --extras dev
knowledge-check:
poetry run python -c "import sys; from collections import Counter; from pathlib import Path; sys.path.insert(0, 'src'); from app.infrastructure.knowledge.loader import load_knowledge_documents; docs = load_knowledge_documents(str(Path('knowledge'))); c = Counter(d.source_file for d in docs); print(f'knowledge/*.yaml -> {len(docs)} documents'); [print(f' {k}: {v}') for k, v in sorted(c.items())]"
run:
PYTHONPATH=src poetry run python -m app.run
app:
docker compose up -d
app-build:
docker compose build
app-restart:
docker compose down && docker compose up -d
app-down:
docker compose down
test:
poetry run pytest -v
clean:
rm -rf .pytest_cache/
rm -rf .coverage
rm -rf coverage.xml
rm -rf .ruff_cache/
rm -rf .mypy_cache/
rm -rf pytest-results.xml
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name "*.pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete
typecheck:
poetry run mypy src
lint:
poetry run ruff check .
logs:
docker compose logs -f rag-worker