MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / _load_result_rows

Function _load_result_rows

orchestrate.py:227–247  ·  view source on GitHub ↗

Load all result rows for a kernel. Returns empty list if no file.

(kernel_file: str)

Source from the content-addressed store, hash-verified

225
226
227def _load_result_rows(kernel_file: str) -> list[dict]:
228 """Load all result rows for a kernel. Returns empty list if no file."""
229 path = _kernel_results_path(kernel_file)
230 if not path.exists():
231 return []
232 rows: list[dict] = []
233 with open(path, "r", encoding="utf-8") as f:
234 header_line = f.readline().strip()
235 if not header_line:
236 return []
237 cols = header_line.split("\t")
238 for line in f:
239 line = line.strip()
240 if not line:
241 continue
242 parts = line.split("\t")
243 row = {}
244 for i, col in enumerate(cols):
245 row[col] = parts[i] if i < len(parts) else ""
246 rows.append(row)
247 return rows
248
249
250# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

_kernel_results_pathFunction · 0.85

Tested by

no test coverage detected