MCPcopy Index your code
hub / github.com/pathwaycom/pathway / load

Function load

python/pathway/tests/test_sqlite.py:277–286  ·  view source on GitHub ↗
(path: pathlib.Path)

Source from the content-addressed store, hash-verified

275 )
276
277 def load(path: pathlib.Path) -> list[dict]:
278 with open(path) as f:
279 rows = [json.loads(line) for line in f]
280 # The time/diff metadata differs between runs; compare only the
281 # data columns.
282 for row in rows:
283 row.pop("time", None)
284 row.pop("diff", None)
285 rows.sort(key=lambda r: r["pkey"])
286 return rows
287
288 assert load(direct_path) == load(roundtrip_path)
289

Callers 3

evaluateMethod · 0.85
compare_ls_bert_scoreFunction · 0.85

Calls 2

sortMethod · 0.80
loadsMethod · 0.45

Tested by

no test coverage detected