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

Function run_computation

python/pathway/tests/test_persistence.py:292–307  ·  view source on GitHub ↗
(inputs, expected)

Source from the content-addressed store, hash-verified

290 count = 0
291
292 def run_computation(inputs, expected):
293 nonlocal count
294 count += 1
295 G.clear()
296 path = input_path / str(count)
297 write_lines(path, inputs)
298 t_1 = pw.io.csv.read(input_path, schema=schema, mode="static")
299 res = logic(t_1)
300 pw.io.csv.write(res, output_path)
301 run(
302 persistence_config=pw.persistence.Config(
303 pw.persistence.Backend.filesystem(persistent_storage_path),
304 persistence_mode=mode,
305 )
306 )
307 assert_sets_equality_from_path(output_path, expected)
308
309 return run_computation, input_path
310

Calls 8

write_linesFunction · 0.90
runFunction · 0.90
clearMethod · 0.80
writeMethod · 0.80
filesystemMethod · 0.80
logicFunction · 0.70
InputSubjectClass · 0.70

Tested by

no test coverage detected