feat(cli): graph-report titles + JSON warning; wire recommend/cocited (U-1,U-3,U-4,C-9)
- U-1: 'graph report' shows the paper title next to each in-KB hub (dangling OpenAlex-id hubs are flagged), instead of bare ids. - U-3: '--json' now includes a 'small_corpus_warning' field (null unless below graph_min_corpus_size) instead of silently dropping the warning. - C-9: new 'codex discover recommend <id>' wires semanticscholar.fetch_recommendations (was implemented + tested but unreachable). - U-4: new 'codex graph cocited <id>' wires graph.find_co_cited (likewise). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,9 +28,11 @@ def _make_conn_cm(conn: MagicMock):
|
||||
|
||||
|
||||
def _make_conn_with_paper_ids(*paper_ids: str) -> MagicMock:
|
||||
"""Mock conn that returns paper rows for SELECT id FROM papers."""
|
||||
"""Mock conn that returns paper rows for SELECT id, title FROM papers."""
|
||||
conn = MagicMock()
|
||||
conn.execute.return_value.fetchall.return_value = [{"id": pid} for pid in paper_ids]
|
||||
conn.execute.return_value.fetchall.return_value = [
|
||||
{"id": pid, "title": f"Title of {pid}"} for pid in paper_ids
|
||||
]
|
||||
return conn
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user