Files
brain-of-reese/pyproject.toml
T
ducoterra e0f11e7aa8
Build and Push Containers / build-and-push-app (push) Failing after 2m36s
Build and Push Containers / build-and-push-db (push) Successful in 1m39s
phase: 126_pdf_support
All gates verified green — no code changes were needed on this pass. Final report:

## Phase 126 — PDF support: final verification pass

**Verified (all tasks 01–05 already complete in working tree):**
- `pymupdf` dep in `pyproject.toml`/`uv.lock`; `.env.example` documents the `pdf` token
- `app/rag/pdf.py` (text + image extraction, MIME mapping), page-aware `_chunk_pdf`, importer `_index_pdf_file` + embedded-image pass, archives covered via extension walk

**Test / lint / coverage results:**
- `uv run pytest` → 2997 passed
- `uv run pytest tests/e2e/test_pdf_support.py -v --no-cov` (isolation) → 6 passed
- `uv run pytest --cov=app --cov-report=term-missing` → TOTAL **99%** (>90% gate), 2997 passed
- `uv run ruff check . && uv run pyright` → clean (0 errors)

**Completion criteria:**
1. PDF → doc with text/chunks/embedding/summary — ✅ (integration + E2E Sources-page tests)
2. `BOR_IMAGES=true`: embedded images → standalone image docs — ✅ (integration + E2E chat-chip test)
3. `BOR_IMAGES=false`: images skipped, text indexed — ✅ (both suites)
4. PDF renders as extracted text in viewer — ✅ (E2E)
5. Test/coverage/lint gates — ✅ (above)
6. Commit + phase move — harness handles (per protocol, no `git` on this pass)

**Decisions:** none new; inline `[Embedded image: …]` placeholders were a documented task-04 deviation (simplified spec wins) — not a defect. No defects found; repo left functional with changes in the working tree.

**Next pending phase:** none — `todo/` is empty once 126 is moved.
2026-09-27 09:36:40 -04:00

62 lines
2.0 KiB
TOML

[project]
name = "brain-of-reese"
version = "0.1.0"
description = "Brain of Reese — a chippy RAG chatbot that answers questions about Reese's Homelab and Deployments, powered by self-hosted models."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
# --- Web framework ---
"fastapi>=0.115,<1.0",
"uvicorn[standard]>=0.30,<1.0",
"pydantic>=2.7,<3.0",
"pydantic-settings>=2.3,<3.0",
"python-dotenv>=1.0,<2.0",
# --- Database (PostgreSQL 17 + pgvector) ---
"sqlalchemy>=2.0,<2.1",
"alembic>=1.13,<2.0",
"psycopg[binary]>=3.1,<4.0",
"pgvector>=0.3,<1.0",
# --- LLM client (OpenAI-compatible, self-hosted "aipi") ---
"httpx>=0.27,<1.0",
"openai>=1.40,<3.0",
# Phase 16: starlette's SessionMiddleware signs the session cookie with
# itsdangerous — an OPTIONAL starlette extra ("full") since starlette 1.x,
# so the app declares it directly (narrower than starlette[full]).
"itsdangerous>=2.2,<3.0",
# Phase 49: FastAPI's multipart parser for the archive upload form
# (POST /api/git-sources/upload) — an A2 FastAPI implementation detail,
# not a new architectural anchor (phase 49 locked decisions).
"python-multipart>=0.0.9,<0.1",
# Phase 126: PDF support (locked A1) — PyMuPDF (import name `fitz`) is the
# PDF parser: page-by-page text extraction AND embedded image extraction
# in a single API. Chosen over pdfplumber (text-only) per phase 126 design.
"pymupdf>=1.24,<2.0",
]
[dependency-groups]
dev = [
"debugpy>=1.8",
"ruff>=0.5",
"pyright>=1.1",
"pytest>=8.2",
"pytest-cov>=5.0",
"playwright>=1.45",
]
[tool.ruff]
line-length = 100
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "B", "SIM"]
[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "standard"
include = ["app", "scripts", "alembic", "tests"]
[tool.pytest.ini_options]
testpaths = ["tests/unit", "tests/integration"]
pythonpath = ["."]
addopts = "-q"