renderables
Rich renderables (header, progress bar, progress panel, summary, help, easter egg).
Classes¶
Functions:¶
format_cost ¶
make_easter_egg ¶
Create the Fulcrum Genomics easter egg renderable.
Renders the bundled logo (snakesee/assets/logo.png, rasterized from the
upstream SVG with a flat dark background) into the terminal at the given
size using rich-pixels' half-block characters. Falls back to a text logo if
the image is missing or unreadable.
The image is downscaled directly to the target rich-pixels render size with bilinear resampling — bilinear blurs slightly more than LANCZOS, but the softer edges read better through 1px-wide half-block cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
console_width
|
int
|
Width of the terminal console in characters. |
80
|
console_height
|
int
|
Height of the terminal console in lines. |
24
|
Returns:
| Type | Description |
|---|---|
RenderableType
|
A Rich renderable (Group of centered pixels + dismiss hint) displaying |
RenderableType
|
the Fulcrum Genomics logo, or a text fallback. |
Source code in snakesee/tui/renderables.py
make_header ¶
make_header(progress: WorkflowProgress, workflow_path: str, paused: bool, event_reader: EventReader | None, max_path_len: int = 60) -> Panel
Create the header panel with workflow path and status.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress
|
WorkflowProgress
|
Current workflow progress snapshot. |
required |
workflow_path
|
str
|
Resolved absolute path to the monitored workflow directory.
Resolving once at the call site keeps the per-frame cost to a string
truncation rather than a filesystem |
required |
paused
|
bool
|
Whether auto-refresh is currently paused. |
required |
event_reader
|
EventReader | None
|
Active event reader if using event-based monitoring, else None. |
required |
max_path_len
|
int
|
Maximum characters to spend on the path before middle-truncating, so a long path can't crowd out the status fields. |
60
|
Returns:
| Type | Description |
|---|---|
Panel
|
A Rich Panel containing the header text. |
Source code in snakesee/tui/renderables.py
make_help ¶
Create the help overlay panel.
Returns:
| Type | Description |
|---|---|
Panel
|
A Rich Panel containing the keyboard shortcut reference. |
Source code in snakesee/tui/renderables.py
make_progress_bar ¶
make_progress_bar(progress: WorkflowProgress, width: int, accessibility: AccessibilityConfig) -> Text
Create a colored progress bar showing succeeded/failed/in-flight/pending portions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress
|
WorkflowProgress
|
Current workflow progress snapshot. |
required |
width
|
int
|
Total character width of the bar. |
required |
accessibility
|
AccessibilityConfig
|
Visual encoding config controlling bar characters. |
required |
Returns:
| Type | Description |
|---|---|
Text
|
A Rich Text object representing the progress bar. |
Source code in snakesee/tui/renderables.py
make_progress_panel ¶
make_progress_panel(progress: WorkflowProgress, estimate: TimeEstimate | None, use_estimation: bool, accessibility: AccessibilityConfig, console_width: int = 80) -> Panel
Create the progress bar panel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress
|
WorkflowProgress
|
Current workflow progress snapshot. |
required |
estimate
|
TimeEstimate | None
|
Time estimate from the estimator, or None if unavailable. |
required |
use_estimation
|
bool
|
Whether time estimation is enabled. |
required |
accessibility
|
AccessibilityConfig
|
Visual encoding config for the progress bar. |
required |
console_width
|
int
|
Width of the terminal console in characters. |
80
|
Returns:
| Type | Description |
|---|---|
Panel
|
A Rich Panel containing the progress bar, ETA, and legend. |
Source code in snakesee/tui/renderables.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | |
make_remote_job_info ¶
make_remote_job_info(job: JobInfo) -> list[Text]
Build display lines describing a remote job's external identifier and links.
For a job that ran on a remote executor (e.g. AWS Batch), this surfaces the external job id and, when enough information is available, deep links to the AWS console and CloudWatch logs. It degrades gracefully: a bare job id with no region yields just the id line; a local job yields no lines at all.
Lines are Rich Text rather than str so styling (e.g. the dimmed
termination-source parenthetical) survives the job-detail RichLog,
which deliberately disables markup to avoid misrendering log content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
job
|
JobInfo
|
The job to describe. |
required |
Returns:
| Type | Description |
|---|---|
list[Text]
|
A list of text lines (empty if the job has no external identifier). |
Source code in snakesee/tui/renderables.py
make_summary_footer ¶
make_summary_footer(progress: WorkflowProgress) -> Panel
Create the job status summary as a one-line footer panel.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
progress
|
WorkflowProgress
|
Current workflow progress snapshot. |
required |
Returns:
| Type | Description |
|---|---|
Panel
|
A Rich Panel containing the job status summary. |