mirror of
https://github.com/usestrix/strix.git
synced 2026-10-11 03:37:54 +00:00
Declare [project.optional-dependencies] with vertex (google-auth) and bedrock (boto3) extras so "strix-agent[vertex]" / "strix-agent[bedrock]" install the provider SDKs. Add an Installation section to the Bedrock docs mirroring Vertex, and a _provider_import_hint helper in warm_up_llm that surfaces a pip-install hint when a provider dependency is missing. Fixes #574, #573 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
775 B
Python
26 lines
775 B
Python
"""Tests for the optional-dependency extras declared in pyproject.toml."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import tomllib
|
|
from pathlib import Path
|
|
|
|
|
|
PYPROJECT = Path(__file__).resolve().parent.parent / "pyproject.toml"
|
|
|
|
|
|
def _optional_dependencies() -> dict[str, list[str]]:
|
|
data = tomllib.loads(PYPROJECT.read_text(encoding="utf-8"))
|
|
return data["project"]["optional-dependencies"]
|
|
|
|
|
|
def test_vertex_extra_pins_google_auth() -> None:
|
|
extras = _optional_dependencies()
|
|
assert "vertex" in extras
|
|
assert any(req.startswith("google-auth") for req in extras["vertex"])
|
|
|
|
|
|
def test_bedrock_extra_pins_boto3() -> None:
|
|
extras = _optional_dependencies()
|
|
assert "bedrock" in extras
|
|
assert any(req.startswith("boto3") for req in extras["bedrock"])
|