Initial commit: CI Agent competitive-intelligence monitoring app
FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
"""Deterministic mock enrichment provider - the default (no
|
||||
`NINJAPEAR_API_KEY` configured) and what every automated test runs against.
|
||||
Never calls a network, never fabricates data it has no basis for: every
|
||||
field comes back empty/`None`, same honesty philosophy as
|
||||
`app/search/mock.py` and `app/collectors/patents.py`'s no-key path. In
|
||||
practice the enrichment task is never even enqueued without a real key
|
||||
(see `company_service.create_company`), so this mostly exists for tests
|
||||
and for direct calls to `enrichment_service.enrich_company`.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from app.enrichment.base import (
|
||||
CompanyDetails,
|
||||
CompanyFunding,
|
||||
CompetitorWithReason,
|
||||
Customer,
|
||||
Product,
|
||||
RecentUpdate,
|
||||
)
|
||||
|
||||
|
||||
class MockEnrichmentProvider:
|
||||
provider_name = "mock"
|
||||
|
||||
async def get_company_details(self, name: str, website: str | None) -> CompanyDetails:
|
||||
return CompanyDetails()
|
||||
|
||||
async def get_funding(self, name: str, website: str | None) -> CompanyFunding:
|
||||
return CompanyFunding()
|
||||
|
||||
async def get_updates(self, name: str, website: str | None) -> list[RecentUpdate]:
|
||||
return []
|
||||
|
||||
async def get_competitors(self, name: str, website: str | None) -> list[CompetitorWithReason]:
|
||||
return []
|
||||
|
||||
async def get_products(self, name: str, website: str | None) -> list[Product]:
|
||||
return []
|
||||
|
||||
async def get_customers(self, name: str, website: str | None) -> list[Customer]:
|
||||
return []
|
||||
|
||||
async def get_work_email(self, person_name: str, company_website: str) -> str | None:
|
||||
return None
|
||||
|
||||
async def get_person_profile(
|
||||
self, person_name: str, company_website: str
|
||||
) -> tuple[str | None, str | None]:
|
||||
return None, None
|
||||
Reference in New Issue
Block a user