Skip to content

verify

Verify that a change of a model changes only what it is meant to change.

pkpdsim-verify is a wrapper of python -m sbmlsim.run verify, see sbmlsim.verify for the subcommands (dump, compare, ranges, fits, definitions, settings, png, sbml, scorecard) and the exit codes. It keeps the options of pkpdsim and adds what a model of pkpdsim is:

  • --model PACKAGE is the dotted name of a model package which defines its model object MODEL (pkpdsim.model.PKPDModel), i.e. --project PACKAGE:MODEL,
  • a dump records the sex of the build of every task (builds), from PKPDSimulationExperiment.variant_of, and the versions of pkpdsim, sbmlsim and sbmlutils (the core libraries of the release settings of the model),
  • scorecard pools with the evidence extensions of pkpdsim.credibility (EXTENSIONS), the qualification of the ratio pairs by --field (default health) in the wording of the limits of Guest et al.

A model before and after a change, with tight tolerances so that the solver does not hide a difference:

git worktree add --detach ../base develop
(cd ../base && uv run python pkdb_models/models/hctz/models/factory.py)
uv run python pkdb_models/models/hctz/models/factory.py
uv run pkpdsim-verify dump --root ../base --model pkdb_models.models.hctz     --out base.pkl --atol 1e-16 --rtol 1e-12 --grid 1000
uv run pkpdsim-verify dump --root . --model pkdb_models.models.hctz     --out new.pkl --order base.pkl --atol 1e-16 --rtol 1e-12 --grid 1000
uv run pkpdsim-verify compare base.pkl new.pkl

UsageError

Bases: ValueError

The command line is no command of pkpdsim-verify.

translate

translate(arguments)

Get the arguments of python -m sbmlsim.run verify for those of pkpdsim-verify.

Parameters:

Name Type Description Default
arguments Sequence[str]

the arguments after pkpdsim-verify.

required

Returns:

Type Description
list[str]

The arguments after verify.

Raises:

Type Description
UsageError

if a subcommand which loads a model gets no --root or no --model.

parser

parser()

Create the parser of the command line, which checks the arguments and shows the help.

The arguments themselves are translated (translate) for sbmlsim.verify.

verify

verify(args=None)

Run a subcommand.

Parameters:

Name Type Description Default
args Sequence[str] | None

the command line arguments, sys.argv[1:] by default.

None

Returns:

Type Description
int

The exit code of sbmlsim.verify: 0 nothing differs, 1 a difference, 2 a

int

command which cannot be run, 3 a failure.

main

main()

The command pkpdsim-verify.