| 59 | return self._parameters |
| 60 | |
| 61 | def _steps(self, plan): |
| 62 | step_names = list(plan) |
| 63 | step_index = 0 |
| 64 | step_name = step_names[step_index] |
| 65 | while True: |
| 66 | next_step_name = yield plan[step_name] |
| 67 | if next_step_name == self._DONE_STEP: |
| 68 | yield self._STOP_RUNNING |
| 69 | elif next_step_name is None: |
| 70 | # If no explicit step is given, we go on to the next |
| 71 | # sequential step. |
| 72 | step_index += 1 |
| 73 | if step_index == len(step_names): |
| 74 | # If this is the last step, we're done with the |
| 75 | # plan phase. |
| 76 | yield self._STOP_RUNNING |
| 77 | step_name = step_names[step_index] |
| 78 | else: |
| 79 | # If an explicit name is given we find the index |
| 80 | # of the step name and update accordingly. |
| 81 | step_index = step_names.index(next_step_name) |
| 82 | step_name = next_step_name |
| 83 | |
| 84 | def _run_plan_step(self, step): |
| 85 | # Running step consists of first fetching any values |