ledger: add verify script for GDP extraction artifact

This commit is contained in:
ledger committed 2026-10-30 22:52:59 +00:00
1 parent 56013f2edd
commit 2d7e0dcc92
1 file changed
+13
+13
View File
@@ -0,0 +1,13 @@
import csv, sys
csv_path = '/root/troupe-standup/wizard-work/ledger/gdp_nominal_by_imf_wb_un.csv'
with open(csv_path) as f:
rows = list(csv.reader(f))
assert rows, 'csv is empty'
assert rows[0] == ['Country/Territory', 'IMF(2026)[1]', 'World Bank(2025)[6]', 'United Nations(2024)[7]'], rows[0]
assert len(rows) == 223, len(rows)
assert all('mw-parser-output' not in c and 'sr-only' not in c for r in rows for c in r)
# every data row must have exactly 4 cells
assert all(len(r) == 4 for r in rows)
print('OK', len(rows) - 1, 'data rows; header + 4 cells/row; no parser junk')