MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / write_csv

Function write_csv

experiments/human_eval/build_model_human_eval_packet.py:204–210  ·  view source on GitHub ↗
(path: Path, rows: List[Dict[str, Any]])

Source from the content-addressed store, hash-verified

202
203
204def write_csv(path: Path, rows: List[Dict[str, Any]]) -> None:
205 path.parent.mkdir(parents=True, exist_ok=True)
206 fields = list(rows[0].keys()) if rows else []
207 with path.open("w", encoding="utf-8-sig", newline="") as handle:
208 writer = csv.DictWriter(handle, fieldnames=fields)
209 writer.writeheader()
210 writer.writerows(rows)
211
212
213def write_guidelines(path: Path) -> None:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected