Report
Report
evo.blockmodels.typed.report.Report
A typed wrapper for block model report specifications.
Reports provide resource estimation summaries for block models. They calculate tonnages, grades, and metal content grouped by categories (e.g., geological domains).
Example usage:
id
The unique identifier of the report specification.
name
The name of the report.
description
The description of the report.
block_model_uuid
The UUID of the block model this report is for.
revision
The revision number of the report specification.
__init__
Initialize a Report instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context | IContext | The context containing environment, connector, and cache. | required |
block_model_uuid | UUID | The UUID of the block model this report is for. | required |
specification | ReportSpecificationWithLastRunInfo | ReportSpecificationWithJobUrl | The report specification from the API. | required |
block_model_name | str | None | The name of the block model (for display purposes). | None |
create
Create a new report specification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context | IContext | The context containing environment, connector, and cache. | required |
block_model_uuid | UUID | The UUID of the block model to create the report for. | required |
data | ReportSpecificationData | The report specification data. | required |
column_id_map | dict[str, UUID] | Mapping of column names to their UUIDs in the block model. | required |
fb | IFeedback | Optional feedback interface for progress reporting. | NoFeedback |
block_model_name | str | None | The name of the block model (for display purposes). | None |
Returns:
| Type | Description |
|---|---|
Report | A Report instance representing the created report. |
run
Run the report to generate a new result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version_uuid | UUID | None | Optional specific version UUID to run the report on. If None, runs on the latest version. | None |
fb | IFeedback | Optional feedback interface for progress reporting. | NoFeedback |
Returns:
| Type | Description |
|---|---|
ReportResult | The generated report result. |
refresh
Get the most recent result for this report, waiting if necessary.
If no results exist yet (e.g., report is still running), this method will poll until a result is available or the timeout is reached.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fb | IFeedback | Optional feedback interface for progress reporting. | NoFeedback |
timeout_seconds | float | Maximum time to wait for results (default 120 seconds). | 120.0 |
poll_interval_seconds | float | Time between polling attempts (default 2 seconds). | 2.0 |
Returns:
| Type | Description |
|---|---|
ReportResult | The latest report result. |
Raises:
| Type | Description |
|---|---|
TimeoutError | If no results are available within the timeout period. |
list_results
List all results for this report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit | int | Maximum number of results to return. | 50 |
fb | IFeedback | Optional feedback interface for progress reporting. | NoFeedback |
Returns:
| Type | Description |
|---|---|
list[ReportResult] | List of report results, ordered newest first. |