Round-by-Round and Ballot-by-Ballot election audits: a workbench for exploration of risk-limiting audits.
You can install the in-development version via:
git clone https://github.com/gwexploratoryaudits/r2b2.git
cd r2b2
pip install .
R2B2 provides both a Python module for programatic use via its API, and a command-line interface.
Here are some command-line examples for getting interactive help and running audits:
r2b2 --help
r2b2 bulk --help
r2b2 bulk -l "50 100" src/r2b2/tests/data/basic_contest.json brla 0.1 0.1
r2b2 interactive -a minerva -r 0.1 -m 0.2 -v --contest-file src/r2b2/tests/data/basic_contest.json
The R2B2 API is documented at r2b2.readthedocs.io.
See Design Guide for development standards and Audit Design Guide for information about adding an audit to the library.
To run all the tests run
tox
Note, to combine the coverage data from all the tox
environments run:
Windows:
set PYTEST_ADDOPTS=--cov-append tox
Other:
PYTEST_ADDOPTS=--cov-append tox