verify.definitions¶
The fit definitions and the run settings of a project, verify fits, definitions, settings.
fits
¶
Run a minimal fit (one start, a few evaluations) of every fit definition.
Returns:
| Type | Description |
|---|---|
int
|
1 if a fit failed, else 0. |
Raises:
| Type | Description |
|---|---|
UsageError
|
for a project without fits or an unknown subset. |
definitions
¶
Write the fit definitions of a project as json.
The settings, the parameters and the mappings of the collections of
every fit definition, so that the definitions of two checkouts are
compared with diff. The checkout directory (--root, else the root of
the project) is replaced by <root>.
Raises:
| Type | Description |
|---|---|
UsageError
|
for a project without fits. |
capture_settings
¶
Capture the settings a run of an experiment hands to sbmlsim.
The run is intercepted where it reaches sbmlsim: the arguments of the
simulator (Simulator), of the runner (without the simulator) and of the
run (without the output path; with the figure settings of the run), bound
to the signatures, so positional and keyword calls agree, and every
matplotlib rcParams entry which differs from the value before the run, at
the time of the run. calls counts the intercepted calls. The simulator is
the one created before the runner: the designs of an experiment
(sbmlsim.simulation.sampling.parameters_of, local) create simulators of
their own while the runner initializes it, which are neither recorded nor
counted. Nothing is simulated and no report is written.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project
|
Project
|
the project, whose |
required |
experiment
|
type[SimulationExperiment]
|
the experiment class the run gets. |
required |
root
|
Path
|
the checkout; it is replaced by |
required |
run
|
Callable[[type[SimulationExperiment], Path], object] | None
|
the run to intercept, called with the experiment and an output
directory; |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The settings as json values. |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
if the run does not reach the simulator, the runner and the run of the experiments of sbmlsim. |
settings
¶
Write the settings of a run of the experiments of a project as json.
Raises:
| Type | Description |
|---|---|
UsageError
|
for a project without experiments, an unknown experiment or a run which does not reach sbmlsim. |