Files
cmm-report-analyzer/app/routers/results.py
chrisryn 9abf9b4b58 Initial commit: CMM Report Analyzer
FastAPI app that parses CMM inspection reports (PDF/Excel/CSV),
computes SPC metrics (Cp/Cpk/Pp/Ppk, control limits, Shapiro-Wilk),
generates interactive Plotly charts, and provides AI-powered quality
summaries via Azure OpenAI with graceful fallback.

Includes 21 passing tests covering parsers, SPC calculations, and
API endpoints.
2026-02-19 10:38:51 -06:00

14 lines
317 B
Python

from fastapi import APIRouter, HTTPException
from app.services.batch import get_batch
router = APIRouter()
@router.get("/results/{batch_id}")
async def get_results(batch_id: str):
batch = get_batch(batch_id)
if batch is None:
raise HTTPException(404, "Batch not found")
return batch.to_dict()