Files
whyrating-engine-legacy/packages/reviewiq-pipeline/src/reviewiq_pipeline/__init__.py
Alejandro Gutiérrez 824634aa76 feat: Add extensible multi-pipeline integration system
This commit implements a plugin-like pipeline architecture with:

Pipeline Core Package (packages/pipeline-core/):
- BasePipeline abstract class all pipelines implement
- PipelineRegistry for database-backed discovery/management
- PipelineRunner for execution with status tracking
- DashboardConfig contracts for dynamic widget definitions

Database Migration (006_pipeline_registry.sql):
- pipeline.registry table for registered pipelines
- pipeline.executions table for execution history
- Views for execution stats and monitoring

ReviewIQ Pipeline Refactor:
- Implements BasePipeline interface
- Adds get_dashboard_config() with widget definitions
- Adds get_widget_data() methods for all dashboard widgets
- Maintains backward compatibility with Pipeline alias

Generic Pipeline API (api/routes/pipelines.py):
- GET /api/pipelines - List all registered pipelines
- GET /api/pipelines/{id} - Pipeline details
- POST /api/pipelines/{id}/execute - Execute pipeline
- GET /api/pipelines/{id}/dashboard - Dashboard config
- GET /api/pipelines/{id}/widgets/{w} - Widget data
- GET /api/pipelines/{id}/executions - Execution history

Frontend Dynamic Dashboard System:
- DynamicDashboard component renders from config
- WidgetRegistry maps types to components
- Widget components: StatCard, LineChart, BarChart,
  PieChart, DataTable, Heatmap
- Pipeline API client library

Frontend Pipeline Pages:
- /pipelines - List all registered pipelines
- /pipelines/[id] - Dynamic dashboard for pipeline
- /pipelines/[id]/executions - Execution history
- Pipelines nav item in Sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 19:05:38 +00:00

62 lines
1.5 KiB
Python

"""
ReviewIQ Pipeline - LLM-powered review classification and analysis.
This package provides a complete pipeline for processing customer reviews:
- Stage 1: Normalization (text cleaning, language detection, deduplication)
- Stage 2: LLM Classification (span extraction with URT codes)
- Stage 3: Issue Routing (route negative spans to issues)
- Stage 4: Fact Aggregation (pre-aggregate metrics for dashboards)
Implements the BasePipeline interface from pipeline-core for the extensible
multi-pipeline system with dynamic dashboards.
"""
from reviewiq_pipeline.config import Config
from reviewiq_pipeline.contracts import (
ClassifiedReview,
ExtractedSpan,
FactRecord,
NormalizedReview,
RawReview,
RoutedSpan,
ScraperOutput,
Stage1Input,
Stage1Output,
Stage2Input,
Stage2Output,
Stage3Input,
Stage3Output,
Stage4Input,
Stage4Output,
ValidationError,
ValidationResult,
)
from reviewiq_pipeline.pipeline import Pipeline, PipelineResult, ReviewIQPipeline
__version__ = "0.1.0"
__all__ = [
# Main API
"Pipeline",
"ReviewIQPipeline",
"PipelineResult",
"Config",
# Contracts
"ScraperOutput",
"RawReview",
"Stage1Input",
"Stage1Output",
"NormalizedReview",
"Stage2Input",
"Stage2Output",
"ClassifiedReview",
"ExtractedSpan",
"Stage3Input",
"Stage3Output",
"RoutedSpan",
"Stage4Input",
"Stage4Output",
"FactRecord",
"ValidationResult",
"ValidationError",
]