Execution display (notebook HTML)¶
Jupyter helpers such as :class:~deeporigin.drug_discovery.notebook_watch_mixin.NotebookWatchMixin render execution state using :class:~deeporigin.platform.execution_display.ExecutionDisplay — a small Bootstrap card with progress and metadata, without the legacy Job widget.
When progressReport is a v2 execution tree (root node with displayName and status), the card body renders an indented HTML/SVG tree via :func:~deeporigin.platform.progress_tree_display.render_progress_tree_html: status-colored nodes, optional SVG completion rings from toolProgress.complete, and expandable error details on failed steps. Legacy shapes (flat {"complete": n} or batched workflow keys) keep the Bootstrap horizontal progress bar while status is Running.
src.platform.execution_display.ExecutionDisplay
dataclass
¶
Display model for a single platform execution in Jupyter HTML.
Attributes:
| Name | Type | Description |
|---|---|---|
complete |
float | int
|
Progress 0–100 from |
execution_id |
str | None
|
Platform execution UUID string, or |
name |
str | None
|
Optional user label from the execution. |
status |
str
|
Lifecycle status (see :data: |
tool_key |
str | None
|
Platform tool identifier from the execution DTO, if known. |
tool_version |
str | None
|
Tool version string from the execution DTO, if known. |
workflow_child_count |
int
|
Number of |
workflow_subjob_completes |
tuple[float, ...]
|
Per-workflow |
progress_report |
dict | str | None
|
Raw |
Attributes¶
workflow_subjob_completes
class-attribute
instance-attribute
¶
workflow_subjob_completes: tuple[float, ...] = ()
Methods:¶
from_dto
classmethod
¶
from_dto(dto: dict) -> Self
Build an :class:ExecutionDisplay from a tools API execution DTO.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dto
|
dict
|
Execution dict with at least |
required |
Returns:
| Type | Description |
|---|---|
Self
|
Populated display model. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
from_pending
classmethod
¶
from_pending(
*,
name: str | None,
status: str | None,
tool_key: str | None = None,
tool_version: str | None = None
) -> Self
Build a display for an object that has not received a platform execution ID yet.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str | None
|
Optional user label (e.g. from :class: |
required |
status
|
str | None
|
Current lifecycle status, or |
required |
tool_key
|
str | None
|
Optional tool key (e.g. from the execution class |
None
|
tool_version
|
str | None
|
Optional tool version (e.g. from |
None
|
Returns:
| Type | Description |
|---|---|
Self
|
Display model with |
render_html
¶
render_html(*, will_auto_update: bool = False) -> str
Render a self-contained Bootstrap 5 card HTML fragment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
will_auto_update
|
bool
|
If True, show a live-update hint in the footer. |
False
|
Returns:
| Type | Description |
|---|---|
str
|
HTML string safe for :class: |
Note
When progress_report is a v2 tree, the tree is shown for all
statuses. Otherwise the Bootstrap progress bar is shown only when
:attr:status is "Running".