sec_interp.gui.preview_reporter module

Reporting and results formatting for SecInterp preview.

This module provides the PreviewReporter class to handle the formatting of preview generation results and performance metrics into human-readable messages.

class sec_interp.gui.preview_reporter.PreviewReporter

Bases: object

Formatter for preview generation results and status messages.

static format_drillhole_summary(drillhole_data: Any | None) str

Format a summary line for drillhole data.

static format_geology_summary(geol_data: list[GeologySegment] | None) str

Format a summary line for geology data.

static format_performance_metrics(metrics: MetricsCollector, result: PreviewResult) list[str]

Format performance metrics into a list of strings.

static format_result_metrics(result: PreviewResult) list[str]

Format elevation metrics for the results message.

static format_results_message(result: PreviewResult, metrics: MetricsCollector) str

Format results message for display using core result objects.

Parameters:
  • result – The preview result object containing data and metadata.

  • metrics – Performance metrics collector.

Returns:

A formatted string ready for display in the UI.

static format_structure_summary(struct_data: list[StructureMeasurement] | None, buffer_dist: float) str

Format a summary line for structural data.