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

Function user_rows

experiments/benchmark/prepare_hf_benchmark_package.py:349–357  ·  view source on GitHub ↗

Yield one user dict per row from the source users.json wrapper.

(source_dir: Path)

Source from the content-addressed store, hash-verified

347
348
349def user_rows(source_dir: Path):
350 """Yield one user dict per row from the source users.json wrapper."""
351 src = source_dir / "users.json"
352 if not src.exists():
353 return
354 with src.open("r", encoding="utf-8") as handle:
355 payload = json.load(handle)
356 for user in payload.get("users") or []:
357 yield user
358
359
360def prepare(source_dir: Path, output_dir: Path, clean: bool = True) -> None:

Callers 1

prepareFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected