[project]
name = "dataknobs-llm"
version = "0.3.5"
description = "LLM utilities for DataKnobs"
readme = "README.md"
authors = [
    { name = "Spence Koehler", email = "KoehlerSB747@gmail.com" }
]
requires-python = ">=3.10"
dependencies = [
    "dataknobs-common>=1.0.1",
    "dataknobs-config>=0.2.0",
    "dataknobs-data>=0.3.1",
    "pyyaml>=6.0",
    "jinja2>=3.1.0",
]

[project.optional-dependencies]
openai = [
    "openai>=1.0.0",
]
anthropic = [
    "anthropic>=0.18.0",
]
ollama = [
    "aiohttp>=3.8.0",
]
huggingface = [
    "aiohttp>=3.8.0",
]
embeddings = [
    "transformers>=4.30.0",
    "torch>=2.0.0",
]
all = [
    "dataknobs-llm[openai,anthropic,ollama,huggingface,embeddings]",
]

[tool.uv.sources]
dataknobs-common = { workspace = true }
dataknobs-config = { workspace = true }
dataknobs-data = { workspace = true }

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
    "pytest>=8.0.0",
    "pytest-asyncio>=0.21.0",
    "pytest-cov>=4.0.0",
    "pytest-benchmark>=4.0.0",
    "ruff>=0.1.0",
    "mypy>=1.0.0",
]

[tool.hatch.build.targets.wheel]
packages = ["src/dataknobs_llm"]

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
    "--cov=dataknobs_llm",
    "--cov-report=term-missing",
    "--cov-report=html",
    "--cov-report=xml",
    "-v",
]
asyncio_mode = "auto"
markers = [
    "integration: marks tests as integration tests (requires external services)",
    "ollama: marks tests as requiring Ollama LLM server",
    "slow: marks tests as slow running",
]

[tool.coverage.run]
source = ["src/dataknobs_llm"]
omit = [
    "*/tests/*",
    "*/__init__.py",
]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "def __repr__",
    "if __name__ == .__main__.:",
    "raise NotImplementedError",
    "if TYPE_CHECKING:",
    "@abstractmethod",
]
