-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecute_migration.py
More file actions
95 lines (73 loc) · 2.95 KB
/
execute_migration.py
File metadata and controls
95 lines (73 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python3
"""
FSL Continuum Migration Execution Script
"""
import subprocess
import sys
import os
def execute_migration():
"""Execute the robust migration tool."""
script_path = "/home/ubuntu/src/repos/fsl-continuum/tools/migration_tools/robust_migrator.py"
try:
# Execute migration script
result = subprocess.run([
sys.executable, script_path
], capture_output=True, text=True, cwd="/home/ubuntu/src/repos/fsl-continuum")
print("🚀 FSL Continuum Migration Execution:")
print("STDOUT:")
print(result.stdout)
if result.stderr:
print("STDERR:")
print(result.stderr)
print(f"Return Code: {result.returncode}")
return result.returncode == 0
except Exception as e:
print(f"❌ Migration execution failed: {e}")
return False
def execute_import_updates():
"""Execute import path updates."""
script_path = "/home/ubuntu/src/repos/fsl-continuum/tools/migration_tools/import_path_updater.py"
try:
# Execute import update script
result = subprocess.run([
sys.executable, script_path
], capture_output=True, text=True, cwd="/home/ubuntu/src/repos/fsl-continuum")
print("\n🔧 FSL Continuum Import Updates:")
print("STDOUT:")
print(result.stdout)
if result.stderr:
print("STDERR:")
print(result.stderr)
print(f"Return Code: {result.returncode}")
return result.returncode == 0
except Exception as e:
print(f"❌ Import update execution failed: {e}")
return False
def main():
"""Execute complete migration process."""
print("🌊 FSL Continuum Complete Migration Execution")
print("=" * 60)
# Step 1: Execute file migration
migration_success = execute_migration()
if migration_success:
print("\n✅ File migration completed successfully!")
# Step 2: Execute import updates
import_success = execute_import_updates()
if import_success:
print("\n✅ Import updates completed successfully!")
print("\n🎉 FSL Continuum Migration - COMPLETE!")
print("✅ Root directory cleaned and organized")
print("✅ Files moved to proper directories")
print("✅ Import paths updated")
print("✅ Professional OSS structure achieved")
print("✅ Terminal velocity optimization complete")
else:
print("\n⚠️ Import updates had issues")
print("📄 Check import_update_report.json for details")
else:
print("\n❌ File migration failed")
print("📄 Check migration_report.json for details")
print("\n" + "=" * 60)
print("🌊 FSL Continuum migration execution complete!")
if __name__ == "__main__":
main()