Implement corpus indexing and MCP search

This commit is contained in:
2026-07-12 23:58:18 +02:00
commit 61580d0f15
15 changed files with 1872 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
from pathlib import Path
import pytest
from corpus_mcp.database import build_database
@pytest.fixture
def corpus(tmp_path: Path) -> tuple[Path, Path]:
source = tmp_path / "source"
source.mkdir()
(source / "guide.md").write_text(
"# Search Guide\n\nThe quick brown fox explains full text search.",
encoding="utf-8",
)
(source / "notes.txt").write_text(
"A second document about SQLite indexing and retrieval.",
encoding="utf-8",
)
database = tmp_path / "corpus.sqlite"
build_database(source, database, description="Test documentation")
return source, database