feat/show estimated finish time and active hook in lamni progress ring

Flomni's ring-progress center label already showed "Est. finish" and
the active at-each-angle hook name; LamNI's equivalent
(_lamnigui_update_progress()) was missing both. Ported the same
formatting/display logic over so the two setups' progress displays
match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
x01dc
2026-07-21 16:21:05 +02:00
co-authored by Claude Sonnet 5
parent 5be3d0719b
commit f524021cce
@@ -250,6 +250,15 @@ class LamniGuiTools:
else:
eta_display = "N/A"
# Format estimated finish (wall-clock) time
finish_str = self.progress.get("estimated_finish_time")
if finish_str is not None:
finish_display = datetime.datetime.fromisoformat(finish_str).strftime(
"%Y-%m-%d %H:%M:%S"
)
else:
finish_display = "N/A"
text = (
f"Progress report:\n"
f" Tomo type: {self.progress['tomo_type']}\n"
@@ -260,8 +269,15 @@ class LamniGuiTools:
f" Current projection within subtomo: {self.progress['subtomo_projection']}\n"
f" Total projections per subtomo: {int(self.progress['subtomo_total_projections'])}\n"
f" Scan started: {start_display}\n"
f" Est. remaining: {eta_display}"
f" Est. remaining: {eta_display}\n"
f" Est. finish: {finish_display}"
)
# self._describe_active_hook() comes from LamNI itself (this is a
# mixin, always combined with it) -- shown only when a hook is
# actually active, mirrors Flomni's identical center-label note.
hook_description = self._describe_active_hook()
if hook_description:
text += f"\n Hook: {hook_description}"
self.progressbar.set_center_label(text)