Run stages. Parameters ---------- stage : str Stage to run
(stage: str)
| 10 | |
| 11 | |
| 12 | def run(stage: str): |
| 13 | """Run stages. |
| 14 | |
| 15 | Parameters |
| 16 | ---------- |
| 17 | stage : str |
| 18 | Stage to run |
| 19 | """ |
| 20 | if stage not in STAGES: |
| 21 | raise ValueError(f"Unknown command: {stage}. Allowed commands are {STAGES}") |
| 22 | stage_fn = globals()[stage] |
| 23 | |
| 24 | if stage == "download": |
| 25 | stage_fn() |
| 26 | return |
| 27 | |
| 28 | stage_fn() |
| 29 | |
| 30 | |
| 31 | if __name__ == "__main__": |
no outgoing calls