turkic-ocr-code / src /linedet /h10_fake.py
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
424 Bytes
"""Self-test helper for the test-pass code path: 100 smoke validation crops written as a manifest whose split column says test (scratch folder only)."""
import sys
from .common import read_manifest, write_tsv
rows = read_manifest(sys.argv[1])[:100]
hdr = list(rows[0].keys())
write_tsv(sys.argv[2], hdr, [[("test" if h == "split" else r[h]) for h in hdr] for r in rows])
print(len(rows), "rows written with split = test")