Estimate time remaining. Returns: ETA string or None if cannot estimate
(self)
| 142 | |
| 143 | if progress <= 0.0: |
| 144 | return None |
| 145 | |
| 146 | total_estimated = elapsed / progress |
| 147 | remaining = total_estimated - elapsed |
| 148 | |
| 149 | if remaining < 0: |
| 150 | return "< 1 min" |
| 151 | |
| 152 | minutes = int(remaining // 60) |
| 153 | seconds = int(remaining % 60) |
| 154 | |
| 155 | if minutes > 60: |
| 156 | hours = minutes // 60 |
| 157 | minutes = minutes % 60 |
| 158 | return f"{hours}h {minutes}m" |
| 159 | elif minutes > 0: |
| 160 | return f"{minutes}m {seconds}s" |
| 161 | else: |
| 162 | return f"{seconds}s" |
| 163 | |
| 164 | |
| 165 | class ModuleProgressBar: |
| 166 | """Progress bar for module-by-module generation.""" |
| 167 | |
| 168 | def __init__(self, total_modules: int, verbose: bool = False): |
| 169 | """ |
| 170 | Initialize module progress bar. |
| 171 | |
| 172 | Args: |
| 173 | total_modules: Total number of modules to process |
| 174 | verbose: Enable verbose output |
| 175 | """ |
| 176 | self.total_modules = total_modules |
nothing calls this directly
no test coverage detected