generate.py

back to table · edit · history · where entries came from · files · download

932 bytes, as of the version from 2026-10-27 01:03 (current). Recorded here, not run.

"""Verify the entire attached selection, without changing the website.

    pip install numberdb python-flint mpmath
    python generate.py

Download balanced_values.py and selection.json beside this file. For the
independent checks, also download balanced_checks.py and a JSON table export:

    python balanced_checks.py T200 --document table.json --selection selection.json

Replace T200 by the identifier in selection.json. This generator has no
publication shortcut: revisions require a fresh baseline and attachment
preconditions, and human review is a separate action.
"""

import json
from pathlib import Path

from balanced_values import BalancedValues


selection = json.loads(Path(__file__).with_name('selection.json').read_text())
generator = BalancedValues(selection['tid'], selection)

if __name__ == '__main__':
    report = generator.verify(sample=None)
    print(report)
    raise SystemExit(0 if report.ok else 1)