Skip to content

Commit

Permalink
Persist workflow steps via ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Dec 4, 2023
1 parent c3cf9a4 commit 10970af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aiida_aurora/workflows/cycling_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def define(cls, spec):

def setup_workload(self):
"""Create an ordered list of protocol step names."""
self.worksteps_keynames = list(self.inputs["protocol_order"])
self.ctx.worksteps_keynames = list(self.inputs["protocol_order"])

def has_steps_remaining(self):
"""Check if there is any remaining step."""
return len(self.worksteps_keynames) > 0
return len(self.ctx.worksteps_keynames) > 0

def inspect_cycling_step(self):
"""Verify that the last cycling step finished successfully."""
Expand Down Expand Up @@ -148,7 +148,7 @@ def inspect_cycling_step(self):

def run_cycling_step(self):
"""Run the next cycling step."""
protocol_name = self.worksteps_keynames.pop(0)
protocol_name = self.ctx.worksteps_keynames.pop(0)

inputs = {
'code': self.inputs.tomato_code,
Expand Down

0 comments on commit 10970af

Please sign in to comment.