Getting started
Install
Section titled “Install”pip install aspire-si-gatesPython 3.10 or newer. There are no dependencies.
Validate a file
Section titled “Validate a file”A data file is JSON Lines: one JSON object per line.
from aspire_si_gates import DataError, load, validate
rows = load("batch3-t05.jsonl")try: validate(rows)except DataError as err: print(err.code, err.message, err.hint)validate runs check_item on every row in order, then check_batch on the whole set. It stops at the first
refusal and raises DataError.
Record which gates passed an item
Section titled “Record which gates passed an item”from aspire_si_gates import gates_identity
print(gates_identity()) # {"version": "1.7.6", "sha256": "..."}The sha256 is taken over the package’s own .py files (name and bytes, in sorted order). A generator can store it
with each item to show exactly which gates the item passed.
Run the tests
Section titled “Run the tests”From a clone of the repository:
python -m pytest -qOr run what the release gate runs: tests, a build, and a smoke import of the built wheel.
bash scripts/verify.sh