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_PATH
|
ReportType
¶
Bases: Enum
Type of report.
create_report
¶
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.
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
|
**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. |