Run the legacy migrator.
()
| 450 | |
| 451 | |
| 452 | def main(): |
| 453 | """Run the legacy migrator.""" |
| 454 | parser = argparse.ArgumentParser(description="GraphBit Legacy Workflow Migration Tool", formatter_class=argparse.RawDescriptionHelpFormatter) |
| 455 | |
| 456 | parser.add_argument("--root", type=Path, default=Path.cwd(), help="Root directory of the project") |
| 457 | |
| 458 | parser.add_argument("--dry-run", action="store_true", help="Perform a dry run without making changes") |
| 459 | |
| 460 | parser.add_argument("--force", action="store_true", help="Force migration even if validation fails") |
| 461 | |
| 462 | args = parser.parse_args() |
| 463 | |
| 464 | migrator = LegacyMigrator(args.root, args.dry_run) |
| 465 | success = migrator.run_migration() |
| 466 | |
| 467 | if not success and not args.force: |
| 468 | print("\n[CRITICAL] Migration failed. Use --force to proceed anyway (not recommended).") |
| 469 | sys.exit(1) |
| 470 | |
| 471 | sys.exit(0) |
| 472 | |
| 473 | |
| 474 | if __name__ == "__main__": |
no test coverage detected