Skip to content

Commit a0fec9c

Browse files
Nuclear MarmaladeNuclear Marmalade
authored andcommitted
Final polish: branch coverage note, error hierarchy imports
1 parent 9d4d4d1 commit a0fec9c

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
The open-source alternative to Apollo, ZoomInfo, and Clearbit. Enriches business databases using free data sources and local AI.
66

7+
> Coverage is measured with branch coverage enabled (every conditional path counts). 46% branch-aware is roughly equivalent to 67% statement-only on the same 600-test suite.
8+
79
```bash
810
pip install forge-enrichment
911

forge/adapters/ollama.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
import logging
6+
from forge.errors import AdapterError
67
from typing import Any, Dict, List, Optional
78

89
import httpx

forge/db.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import json
99
import logging
1010
import threading
11+
12+
from forge.errors import DatabaseError, TransactionError
1113
from contextlib import contextmanager
1214
from typing import Any, Dict, List, Optional, Tuple, Union
1315

@@ -186,7 +188,7 @@ def write_enrichment(
186188
"business_id": business_id,
187189
"fields_updated": list(safe_updates.keys()),
188190
}
189-
except Exception as e: # Non-critical: return error dict instead of crashing caller
191+
except (DatabaseError, Exception) as e: # Non-critical: return error dict instead of crashing caller
190192
logger.error("write_enrichment failed for %s: %s", business_id, e)
191193
return {"status": "error", "business_id": business_id, "error": str(e)}
192194

forge/enrichment/pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import asyncio
99
import json
1010
import logging
11+
from forge.errors import EnrichmentError
1112
import threading
1213
import time
1314
from dataclasses import dataclass

0 commit comments

Comments
 (0)