umpirix/adapters/python/.github/scripts/check_installed_distribution.py
caelum0x 4847e35451 OpenJev: open-source typed decision service
Typed decision/classification service with an in-process gte-small ONNX
embedding engine and lexical fallback, JS/Python SDKs, adapters, and the
otsone model family. Apache-2.0 (sub-packages keep their MIT licenses).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 00:12:36 +03:00

27 lines
889 B
Python

"""Check an installed adapter distribution."""
# ruff: noqa: INP001 - Standalone CI script.
import asyncio
import sys
from importlib.metadata import version
import openjev_adapters
from openjev_adapters import AsyncSystemOneAdapterClient, SystemOneAdapterClient
async def main() -> None:
"""Check the installed version and initialize both clients."""
if version("openjev-adapters") != sys.argv[1]:
raise RuntimeError("Installed distribution version does not match the release")
if openjev_adapters.__version__ != sys.argv[1]:
raise RuntimeError("Exported version does not match the release")
with SystemOneAdapterClient(structured_outputs=False, llm_answer_mode="discrete"):
pass
async with AsyncSystemOneAdapterClient(structured_outputs=False, llm_answer_mode="discrete"):
pass
if __name__ == "__main__":
asyncio.run(main())