🐛 fix(gui): allow all steps to be runnable independently
- Remove dependency chain that prevented steps 2,3,4 from running - All steps now have can_run=True - Steps can be executed individually without running previous steps
This commit is contained in:
+9
-15
@@ -746,23 +746,17 @@ class MainWindow(ctk.CTk):
|
||||
def _update_step_dependencies(self) -> None:
|
||||
"""Update step run-ability based on dependency status.
|
||||
|
||||
Step 0 (env) is always runnable.
|
||||
Step N is runnable only if all steps before it have completed.
|
||||
All steps are runnable independently.
|
||||
"""
|
||||
for i, step in enumerate(self._steps):
|
||||
if i == 0:
|
||||
step.set_can_run(True)
|
||||
if self._step_statuses.get(i) == "pending":
|
||||
step.set_status("pending")
|
||||
else:
|
||||
prev_completed = all(
|
||||
self._step_statuses.get(j) == "complete"
|
||||
for j in range(i)
|
||||
)
|
||||
step.set_can_run(prev_completed)
|
||||
status = self._step_statuses.get(i, "pending")
|
||||
if not prev_completed and status == "pending":
|
||||
step.set_status("disabled")
|
||||
step.set_can_run(True)
|
||||
status = self._step_statuses.get(i, "pending")
|
||||
if status == "pending":
|
||||
step.set_status("pending")
|
||||
elif status == "complete":
|
||||
step.set_status("complete")
|
||||
elif status == "error":
|
||||
step.set_status("error")
|
||||
|
||||
def _execute_step(self, index: int) -> None:
|
||||
"""Execute a single step independently.
|
||||
|
||||
Reference in New Issue
Block a user