fix(ci): restore green backend gate after engine pin
Ruff: declare adapter re-exports via __all__ in docling_extractor (F401) and sort the engine import block in the adapter test (I001). Pytest: engine-dependent tests now importorskip the pinned engine — CI installs light deps only and the engine repo is private, so they skip visibly there and run in Docker/dev envs with the engine. Verified: ruff clean; pytest 74 passed + 2 skipped without engine, 80 passed with the pinned engine v0.1.0 installed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,17 @@ from teamhub_document_recognition_engine import extract as _engine_extract
|
||||
|
||||
from app.config import settings
|
||||
|
||||
# Re-exported engine models: chunker, table/figure processors and tests import
|
||||
# them from this adapter instead of depending on the engine package directly.
|
||||
__all__ = [
|
||||
"ExtractedBlock",
|
||||
"ExtractedFigure",
|
||||
"ExtractedPage",
|
||||
"ExtractedTable",
|
||||
"ExtractionResult",
|
||||
"extract",
|
||||
]
|
||||
|
||||
|
||||
def extract(pdf_path: Path) -> ExtractionResult:
|
||||
return _engine_extract(pdf_path, docling_ocr_enabled=settings.docling_ocr_enabled)
|
||||
|
||||
Reference in New Issue
Block a user