MCPcopy Create free account
hub / github.com/Dizzy-K/AutoPT / _write_matrix_csv

Function _write_matrix_csv

analysis/cli.py:231–239  ·  view source on GitHub ↗
(path: Path, row_label: str, matrix: dict[str, Any])

Source from the content-addressed store, hash-verified

229
230
231def _write_matrix_csv(path: Path, row_label: str, matrix: dict[str, Any]) -> None:
232 columns = [row_label] + list(matrix.get("cols", []))
233 with path.open("w", newline="", encoding="utf-8") as stream:
234 writer = csv.DictWriter(stream, fieldnames=columns)
235 writer.writeheader()
236 for row_name in matrix.get("rows", []):
237 row = {row_label: row_name}
238 row.update(matrix.get("values", {}).get(row_name, {}))
239 writer.writerow(row)

Callers 1

handle_analysis_commandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected