report.experiment_report¶
Create report of simulation experiments.
ReportResults
¶
Results for a ExperimentReport.
Construct ReportResults.
to_json
¶
Write to JSON.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_path
|
Path
|
Path to the JSON file. |
required |
from_json
staticmethod
¶
Read from JSON.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_path
|
Path
|
Path to the JSON file. |
required |
Returns:
| Type | Description |
|---|---|
ReportResults
|
ReportResults read from the file. |
add_experiment_result
¶
Retrieve information for report from the ExperimentResult.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exp_result
|
ExperimentResult
|
Result of the simulation experiment. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a model has no resolvable path. |
ExperimentReport
¶
Report for an experiment.
Construct an ExperimentReport.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
ReportResults | list[ExperimentResult]
|
Report results or list of experiment results. |
required |
metadata
|
dict[str, Any] | None
|
Additional metadata for the report. |
None
|
template_path
|
Path
|
Directory with the jinja2 templates. |
TEMPLATE_DIR
|
ReportType
¶
Bases: Enum
Type of report.
create_report
¶
create_report(
output_path,
filename=None,
report_type=HTML,
f_filter_context=None,
show_report=False,
**kwargs,
)
Create report of SimulationExperiments.
Processes ExperimentResults to generate overall report.
All relative paths only can be resolved in the report if the paths are below the report or at the same level in the file hierarchy.
The report ends the output of a run with its section: the number of
experiments and the link to the index file, which the terminal opens
with a click, see sbmlsim.display.link.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_path
|
Path
|
Directory for the report. |
required |
filename
|
str | None
|
Name of the index file (without suffix). |
None
|
report_type
|
ReportType
|
Type of the report. |
HTML
|
f_filter_context
|
Callable[[dict[str, Any]], None] | None
|
Function filtering the context (latex reports). |
None
|
show_report
|
bool
|
open the report in a web browser. |
False
|
**kwargs
|
Any
|
Additional arguments, e.g. |
{}
|
Returns:
| Type | Description |
|---|---|
Path
|
Path to the created index file. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the report type is not supported. |