From 10b2270318af9a183e637078160d97f43912cec0 Mon Sep 17 00:00:00 2001 From: Nachou-u Date: Thu, 20 Aug 2026 19:04:03 -0400 Subject: [PATCH] master seed --- seed_all.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 seed_all.py diff --git a/seed_all.py b/seed_all.py new file mode 100644 index 0000000..ca3eaa9 --- /dev/null +++ b/seed_all.py @@ -0,0 +1,38 @@ +import subprocess +import sys +import os + +scripts = [ + 'setup_roles.py', + 'seed_categories.py', + 'seed_projects.py', + 'seed_specialties.py' +] + +def run_all(): + print("🚀 Iniciando Sembrado Maestro (Master Seed) de EFINTEL ERP...") + + # Get the directory of this script + base_dir = os.path.dirname(os.path.abspath(__file__)) + + for script in scripts: + script_path = os.path.join(base_dir, script) + print(f"\n--------------------------------------------------") + print(f"👉 Ejecutando: {script}...") + print(f"--------------------------------------------------") + + # Run script with current python interpreter + result = subprocess.run([sys.executable, script_path], check=False) + + if result.returncode != 0: + print(f"\n❌ Error al ejecutar {script}. Sembrado interrumpido.") + sys.exit(1) + + print("\n==================================================") + print("✅ ¡Sembrado Maestro Completado Exitosamente!") + print("Las categorías, portafolios, proyectos, roles y") + print("especialistas coinciden al 100% con tu entorno actual.") + print("==================================================") + +if __name__ == "__main__": + run_all()