67c002b665
Source-controlled baseline before Phase 5 cron. Excludes oracle.db, logs/, and __pycache__ via .gitignore. Pipeline verified running clean end-to-end (run_log write confirmed before conn.close()).
18 lines
436 B
Python
18 lines
436 B
Python
"""Source adapters for AI Research Oracle."""
|
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
|
class SourceAdapter(ABC):
|
|
"""Base class for all ingestion adapters."""
|
|
|
|
@abstractmethod
|
|
def name(self) -> str:
|
|
"""Source name: 'github', 'arxiv', 'reddit'."""
|
|
pass
|
|
|
|
@abstractmethod
|
|
def fetch(self, query: str = "", limit: int = 20) -> list[dict]:
|
|
"""Return entries matching DB schema fields."""
|
|
pass
|