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 PACKAGEis the dotted name of a model package which defines its model objectMODEL(pkpdsim.model.PKPDModel), i.e.--project PACKAGE:MODEL,- a dump records the sex of the build of every task (
builds), fromPKPDSimulationExperiment.variant_of, and the versions of pkpdsim, sbmlsim and sbmlutils (the core libraries of the release settings of the model), scorecardpools with the evidence extensions ofpkpdsim.credibility(EXTENSIONS), the qualification of the ratio pairs by--field(defaulthealth) 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
¶
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 |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
The arguments after |
Raises:
| Type | Description |
|---|---|
UsageError
|
if a subcommand which loads a model gets no |
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
¶
Run a subcommand.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Sequence[str] | None
|
the command line arguments, |
None
|
Returns:
| Type | Description |
|---|---|
int
|
The exit code of |
int
|
command which cannot be run, 3 a failure. |