provevi.cli

prove: list, show, query and verify the evidence of runs, and check a telemetry policy.

prove reads and checks. Runs are written by provrun, through a provevi store. The one command that writes, prove mlflow, writes only the copy of a run in MLflow. Each command calls a library function and prints what it returns.

cmd_show

source

cmd_show(args: argparse.Namespace) -> int

Print the events of a run, one line each, as prove show and provr show do.

The events come from the store when it holds the run, else from the run folder.

Parameter Type Default Description
args argparse.Namespace required The parsed arguments: run, runs and store
returns int The exit code: 0

verify_command

source

verify_command(args: argparse.Namespace, prog: str, folder: Path | None = None) -> int

Run the verify command of prove and of provr.

It checks the run with verify_run, prints each problem to stderr, and prints a summary when the run verifies.

Parameter Type Default Description
args argparse.Namespace required The parsed arguments that add_verify_arguments adds, with runs and store
prog str required The program’s name, which starts each problem printed to stderr
folder Path | None None The run folder, when the caller found it already; None to find args.run
returns int The exit code: 0 when the run verifies, 1 when it does not

add_verify_arguments

source

add_verify_arguments(v: argparse.ArgumentParser) -> None

Add the arguments of the verify command: the run, –config, –tenant, –bundle and –require-bundle.

Parameter Type Default Description
v argparse.ArgumentParser required The parser of a verify command

main

source

main(argv: list[str] | None = None) -> int

Run the prove command line.

Parameter Type Default Description
argv list[str] | None None The arguments, without the program’s name; None for sys.argv
returns int The command’s exit code: 0 when it succeeds; 1 when verify finds problems, when policy finds problems such as an unapproved version, or for a provevi or provcat error; 2 for an EvidenceError; ui gives MLflow’s exit code. Bad arguments raise SystemExit with 2, from argparse