SupraDashboard / src /feedback /storage.py
Tianyi-Billy-Ma
Deploy: simplify codebase (dead-code removal, behavior-preserving)
1727091
Raw
History Blame Contribute Delete
902 Bytes
"""Compatibility shim for review persistence.
The canonical persistence layer is `store`; this module keeps older imports
working for callers that still use the feedback package.
"""
from __future__ import annotations
from store import export_reviews, save_review
RATINGS = [
"Absolutely right",
"Mostly right",
"Partially right (mixed)",
"Mostly wrong",
"Absolutely wrong",
]
def save_feedback(
*,
ts: str,
inchikey: str,
guest_name: str,
rating: str,
comment: str,
reviewer: str = "",
model: str = "",
prompt_version: str = "",
) -> int:
return save_review(
ts=ts,
inchikey=inchikey,
guest_name=guest_name,
model=model,
prompt_version=prompt_version,
rating=rating,
comment=comment,
reviewer=reviewer,
)
def export_rows() -> list[dict]:
return export_reviews()