Get progress percentage based on current phase.
(self)
| 152 | break |
| 153 | |
| 154 | def get_phase_progress(self) -> float: |
| 155 | """Get progress percentage based on current phase.""" |
| 156 | phase_weights = { |
| 157 | WorkflowPhase.INITIAL: 0.0, |
| 158 | WorkflowPhase.URL_COLLECTION: 0.15, |
| 159 | WorkflowPhase.URL_VALIDATION: 0.25, |
| 160 | WorkflowPhase.SCHEMA_DEFINITION: 0.40, |
| 161 | WorkflowPhase.SCHEMA_VALIDATION: 0.50, |
| 162 | WorkflowPhase.CODE_GENERATION: 0.70, |
| 163 | WorkflowPhase.READY_TO_EXECUTE: 0.85, |
| 164 | WorkflowPhase.EXECUTING: 0.90, |
| 165 | WorkflowPhase.COMPLETED: 1.0, |
| 166 | WorkflowPhase.ERROR: -1.0 |
| 167 | } |
| 168 | return phase_weights.get(self.phase, 0.0) |
| 169 | |
| 170 | def can_transition_to(self, target_phase: WorkflowPhase) -> bool: |
| 171 | """Check if transition to target phase is allowed.""" |
no outgoing calls
no test coverage detected