Files
paperspec/tools/README.md
T
alexm 8b2df58266
check / check (default, macos-latest) (push) Canceled after 0s
check / check (default, ubuntu-latest) (push) Canceled after 0s
check / check (py310, macos-latest) (push) Canceled after 0s
check / check (py310, ubuntu-latest) (push) Canceled after 0s
feat: documents and session tokens
2026-10-12 01:07:50 -04:00

1.7 KiB

Tools

Small programs that build and check the repository, and one for loading packages into SQLite. They use only the Python standard library and are licensed Apache-2.0.

Program Does
check.py Checks everything: schemas, records, packages, the broken packages, every vector, a byte-for-byte rebuild, the SQL round trip and the prose. --quick skips the rebuild.
build.py Builds fixtures/ and vectors/ from the hand-written sources in fixtures/src/ and the cases it defines. --out DIR builds into another folder.
load.py Loads packages into a SQLite database with the tables of sql/: python3 tools/load.py --sqlite lab.db PACKAGE….
oracle/ A compact implementation of every rule, which build.py uses to compute expected values and check.py uses to recompute them.

When to run what

Each program is also a pixi task, so pixi run check, pixi run quick, pixi run build and pixi run load work from anywhere in the repository; pixi run check lints the Markdown first.

Run pixi run check before every commit. Run pixi run build after changing a fixture source, a rule in oracle/, or a case in build.py, then commit the regenerated files with the change; the check fails if they are out of date.

About the oracle

The oracle exists so that no expected value in this repository is typed by hand. It favors clarity over speed, its Ed25519 is the slow reference code of RFC 8032, and it is not a library to build on: implementations follow the specification and test themselves against the vectors. Its JSON Schema validator supports exactly the keyword subset the schemas use, and refuses any schema that uses more.