Return row counts for the main tables.
(conn: sqlite3.Connection)
| 62 | |
| 63 | |
| 64 | def get_table_counts(conn: sqlite3.Connection) -> Dict[str, int]: |
| 65 | """Return row counts for the main tables.""" |
| 66 | counts: Dict[str, int] = {} |
| 67 | cursor = conn.cursor() |
| 68 | |
| 69 | for table_name in ("profiles", "papers", "behavior_logs", "task_status"): |
| 70 | cursor.execute(f"SELECT COUNT(*) FROM {table_name}") |
| 71 | counts[table_name] = int(cursor.fetchone()[0]) |
| 72 | |
| 73 | return counts |
| 74 | |
| 75 | |
| 76 | def _prune_redundant_directions(direction_weights: Dict[str, float]) -> Dict[str, float]: |
no test coverage detected