Skip to content

Commit

Permalink
make progress optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed May 11, 2023
1 parent be6be90 commit bcce9c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions packages/models-library/src/models_library/projects_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class NodeState(BaseModel):
default=0,
ge=0.0,
le=1.0,
description="current progress of the task if available (None if not started)",
description="current progress of the task if available (None if not started or not a computational task)",
)

class Config:
Expand Down Expand Up @@ -139,7 +139,11 @@ class Node(BaseModel):
..., description="The short name of the node", examples=["JupyterLab"]
)
progress: float | None = Field(
default=None, ge=0, le=100, description="the node progress value"
default=None,
ge=0,
le=100,
description="the node progress value",
deprecated=True,
)
thumbnail: HttpUrlWithCustomMinLength | None = Field(
default=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class PipelineDetails(BaseModel):
...,
description="The adjacency list of the current pipeline in terms of {NodeID: [successor NodeID]}",
)
progress: float = Field(
progress: float | None = Field(
...,
ge=0,
le=1.0,
description="the progress of the pipeline",
description="the progress of the pipeline (None if there are no computational tasks)",
)
node_states: dict[NodeID, NodeState] = Field(
..., description="The states of each of the computational nodes in the pipeline"
Expand Down

0 comments on commit bcce9c1

Please sign in to comment.