(metadata: Dict[str, Any], report: Dict[str, Any])
| 2164 | |
| 2165 | def _report_paper_from_metadata(metadata: Dict[str, Any], report: Dict[str, Any]) -> Dict[str, Any]: |
| 2166 | title = _clean_text(metadata.get("title") or report.get("title")) |
| 2167 | return { |
| 2168 | "id": metadata.get("paper_id"), |
| 2169 | "arxiv_id": metadata.get("arxiv_id"), |
| 2170 | "doi": metadata.get("doi"), |
| 2171 | "title": title or "Untitled Paper", |
| 2172 | "authors": metadata.get("authors") or [], |
| 2173 | "abstract": metadata.get("abstract") or "", |
| 2174 | "publish_date": metadata.get("publish_date"), |
| 2175 | "pdf_path": metadata.get("pdf_path"), |
| 2176 | "pdf_url": metadata.get("pdf_url") or report.get("pdf_url"), |
| 2177 | "source": metadata.get("source") or "reading_report", |
| 2178 | } |
| 2179 | |
| 2180 | |
| 2181 | def _report_payload_from_metadata( |
| 2182 | metadata: Dict[str, Any], |
no test coverage detected