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.
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 |
Attributes¶
Functions¶
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
The progress bar is rendered only when :attr:status is "Running".