MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / main

Function main

scripts/legacy-migrator.py:452–471  ·  view source on GitHub ↗

Run the legacy migrator.

()

Source from the content-addressed store, hash-verified

450
451
452def 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
474if __name__ == "__main__":

Callers 1

legacy-migrator.pyFile · 0.70

Calls 2

run_migrationMethod · 0.95
LegacyMigratorClass · 0.85

Tested by

no test coverage detected