From 71dd12072c4cf7e5d3648900cd7373c613461283 Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 6 Jul 2026 02:53:07 -0700 Subject: [PATCH] fix(ci): resolve test collection errors on GitHub CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ocr/__init__.py: move VisionLanguageOCR re-export under TYPE_CHECKING so torch is not imported at module load time - ci.yml: add psycopg2-binary + anthropic to pip install (cf-core community and fixture scripts need these); exclude tests/fixtures/ and test_docuvision_client.py (torch/GPU tests — not runnable on ubuntu-latest) --- .github/workflows/ci.yml | 4 ++-- app/services/ocr/__init__.py | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a1e158..c0e67ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,13 +29,13 @@ jobs: run: pip install git+https://git.opensourcesolarpunk.com/Circuit-Forge/circuitforge-core.git@main - name: Install dependencies - run: pip install -e . pytest pytest-asyncio httpx ruff + run: pip install -e . pytest pytest-asyncio httpx ruff psycopg2-binary anthropic - name: Lint run: ruff check . - name: Test - run: pytest tests/ -v --tb=short + run: pytest tests/ -v --tb=short --ignore=tests/fixtures --ignore=tests/test_services/test_docuvision_client.py frontend: name: Frontend (Vue) diff --git a/app/services/ocr/__init__.py b/app/services/ocr/__init__.py index e00217c..db5c952 100644 --- a/app/services/ocr/__init__.py +++ b/app/services/ocr/__init__.py @@ -1,5 +1,10 @@ """OCR services for receipt text extraction.""" -from .vl_model import VisionLanguageOCR +from __future__ import annotations + +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from .vl_model import VisionLanguageOCR __all__ = ["VisionLanguageOCR"]