Implement corpus indexing and MCP search
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user