Coverage for src / quber / __init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.14.0, created at 2026-09-23 22:14 -0400
« prev ^ index » next coverage.py v7.14.0, created at 2026-09-23 22:14 -0400
1"""
2Quber - Advanced document parsing platform.
4Two engine-agnostic seams:
6- `Parser` Protocol (`quber.core.parsers`) — produces a full DoclingDocument.
7- `TableExtractor` Protocol (`quber.core.extractors`) — produces a list of
8 ExtractedTable Pydantic models from table-only engines like Camelot+LLM.
10Composition of the two is intentionally deferred (see plan §11 Deferred).
11"""
13__version__ = "0.3.0"
15# Two import-time initializers, each a named function (no inline side effects):
16# - preload_cuda_runtime_libs (QUE-219): preload CUDA 12 runtime libs so
17# onnxruntime-gpu's CUDAExecutionProvider can resolve them on CUDA-13 hosts.
18# Must run before any docling/onnxruntime import; silent on CPU-only hosts.
19# - init_s3_cache (QUE-223): register the persistent, TTL-swept S3 client as
20# cloudpathlib's default for s3:// URIs. Offline-safe (boto3 resolves creds
21# and network lazily), so it is fine to run at import on any host.
22from quber.files.cache import init_s3_cache
23from quber.utils.cuda_runtime import preload_cuda_runtime_libs
25preload_cuda_runtime_libs()
26init_s3_cache()
28# No eager re-exports here. Importing the docling-backed parsers or the
29# inference processor at package import would pull the heavy GPU/ML stack into
30# every `import quber` -- including the CPU-only `table` cloud-job image, which
31# imports none of it. Import them from their modules at the point of use, e.g.
32# `from quber.core.parsers import parser_for_preset` or
33# `from quber.processors import TableInferenceProcessor`.