Skip to content

Getting started

Terminal window
pip install aspire-si-gates

Python 3.10 or newer. There are no dependencies.

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.

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.

From a clone of the repository:

Terminal window
python -m pytest -q

Or run what the release gate runs: tests, a build, and a smoke import of the built wheel.

Terminal window
bash scripts/verify.sh