(document)
| 11 | |
| 12 | |
| 13 | def index(document): |
| 14 | if document.get("failures"): |
| 15 | raise ValueError("refusing a partial/failed benchmark") |
| 16 | rows = document["rows"] |
| 17 | keyed = {row["source_hash"]: row for row in rows} |
| 18 | if not rows or len(keyed) != len(rows): |
| 19 | raise ValueError("empty corpus or duplicate source hashes") |
| 20 | return keyed |
| 21 | |
| 22 | |
| 23 | def summarize(semantic, graph, raw=None): |
no test coverage detected