Álvaro Valenzuela Valdes commited on
Commit ·
6a46107
1
Parent(s): e8380c7
data: Add high-impact software tenders and pre-analyzed demo data
Browse files- backend/seed_db.py +58 -42
backend/seed_db.py
CHANGED
|
@@ -17,79 +17,95 @@ def seed():
|
|
| 17 |
|
| 18 |
db = SessionLocal()
|
| 19 |
|
| 20 |
-
# 1. Company Profile
|
| 21 |
profile = CompanyProfileModel(
|
| 22 |
name="Andes Digital Solutions",
|
| 23 |
-
industry="Software & AI
|
| 24 |
-
services="Machine Learning,
|
| 25 |
-
experience="
|
| 26 |
-
certifications="AWS
|
| 27 |
-
regions="Metropolitana, Valparaíso, Biobío",
|
| 28 |
-
documents_available="RUT, Financial Statements 2023, Portfolio,
|
| 29 |
)
|
| 30 |
db.add(profile)
|
| 31 |
|
| 32 |
-
# 2.
|
| 33 |
tenders = [
|
| 34 |
TenderModel(
|
| 35 |
-
code="
|
| 36 |
-
name="
|
| 37 |
-
description="
|
| 38 |
-
buyer="
|
| 39 |
status="Publicada",
|
| 40 |
-
closing_date=(datetime.now() + timedelta(days=
|
| 41 |
-
estimated_amount=
|
| 42 |
region="Metropolitana",
|
| 43 |
sector="Tecnología de la Información",
|
| 44 |
source="Mercado Público"
|
| 45 |
),
|
| 46 |
TenderModel(
|
| 47 |
-
code="
|
| 48 |
-
name="
|
| 49 |
-
description="
|
| 50 |
-
buyer="
|
| 51 |
status="Publicada",
|
| 52 |
-
closing_date=(datetime.now() + timedelta(days=
|
| 53 |
-
estimated_amount=
|
| 54 |
region="Metropolitana",
|
| 55 |
-
sector="
|
| 56 |
source="Mercado Público"
|
| 57 |
),
|
| 58 |
TenderModel(
|
| 59 |
-
code="
|
| 60 |
-
name="
|
| 61 |
-
description="
|
| 62 |
-
buyer="
|
| 63 |
status="Publicada",
|
| 64 |
-
closing_date=(datetime.now() + timedelta(days=
|
| 65 |
-
estimated_amount=
|
| 66 |
-
region="
|
| 67 |
-
sector="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
source="Mercado Público"
|
| 69 |
)
|
| 70 |
]
|
| 71 |
for t in tenders:
|
| 72 |
db.add(t)
|
| 73 |
|
| 74 |
-
# 3.
|
| 75 |
history = AnalysisHistoryModel(
|
| 76 |
-
tender_code="
|
| 77 |
-
tender_name="Plataforma de
|
| 78 |
decision="Recommended",
|
| 79 |
-
score=
|
| 80 |
-
summary="
|
| 81 |
-
risks='
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
)
|
| 89 |
db.add(history)
|
| 90 |
|
| 91 |
db.commit()
|
| 92 |
-
print("Database seeded
|
| 93 |
db.close()
|
| 94 |
|
| 95 |
if __name__ == "__main__":
|
|
|
|
| 17 |
|
| 18 |
db = SessionLocal()
|
| 19 |
|
| 20 |
+
# 1. Company Profile (Your profile)
|
| 21 |
profile = CompanyProfileModel(
|
| 22 |
name="Andes Digital Solutions",
|
| 23 |
+
industry="Software Engineering & AI",
|
| 24 |
+
services="Machine Learning, Custom ERP, Cloud Infrastructure",
|
| 25 |
+
experience="10+ years delivering enterprise software for the public sector.",
|
| 26 |
+
certifications="AWS Partner, ISO 9001, SCRUM Master Team",
|
| 27 |
+
regions="Metropolitana, Valparaíso, Biobío, Araucanía",
|
| 28 |
+
documents_available="RUT, Financial Statements 2023, Technical Portfolio, Staff Certifications"
|
| 29 |
)
|
| 30 |
db.add(profile)
|
| 31 |
|
| 32 |
+
# 2. Software Tenders (The core demo data)
|
| 33 |
tenders = [
|
| 34 |
TenderModel(
|
| 35 |
+
code="2394-15-LR24",
|
| 36 |
+
name="Implementación Sistema ERP para Red de Salud Oriente",
|
| 37 |
+
description="Suministro, instalación y soporte de sistema de gestión de recursos empresariales para red hospitalaria.",
|
| 38 |
+
buyer="Servicio de Salud Metropolitano",
|
| 39 |
status="Publicada",
|
| 40 |
+
closing_date=(datetime.now() + timedelta(days=20)).strftime("%Y-%m-%d"),
|
| 41 |
+
estimated_amount=450000000,
|
| 42 |
region="Metropolitana",
|
| 43 |
sector="Tecnología de la Información",
|
| 44 |
source="Mercado Público"
|
| 45 |
),
|
| 46 |
TenderModel(
|
| 47 |
+
code="5021-10-LP24",
|
| 48 |
+
name="Plataforma de IA para Análisis de Datos Criminalísticos",
|
| 49 |
+
description="Desarrollo de algoritmos de visión computacional y análisis predictivo para seguridad ciudadana.",
|
| 50 |
+
buyer="Subsecretaría de Prevención del Delito",
|
| 51 |
status="Publicada",
|
| 52 |
+
closing_date=(datetime.now() + timedelta(days=12)).strftime("%Y-%m-%d"),
|
| 53 |
+
estimated_amount=180000000,
|
| 54 |
region="Metropolitana",
|
| 55 |
+
sector="Software & IA",
|
| 56 |
source="Mercado Público"
|
| 57 |
),
|
| 58 |
TenderModel(
|
| 59 |
+
code="6655-22-LE24",
|
| 60 |
+
name="Modernización de App Móvil 'Trámites en Línea'",
|
| 61 |
+
description="Rediseño UX/UI y migración a arquitectura serverless de la aplicación ciudadana principal.",
|
| 62 |
+
buyer="Municipalidad de Providencia",
|
| 63 |
status="Publicada",
|
| 64 |
+
closing_date=(datetime.now() + timedelta(days=4)).strftime("%Y-%m-%d"),
|
| 65 |
+
estimated_amount=65000000,
|
| 66 |
+
region="Metropolitana",
|
| 67 |
+
sector="Desarrollo Mobile",
|
| 68 |
+
source="Mercado Público"
|
| 69 |
+
),
|
| 70 |
+
TenderModel(
|
| 71 |
+
code="8899-44-LP24",
|
| 72 |
+
name="Servicio de Ciberseguridad y SOC 24/7",
|
| 73 |
+
description="Monitoreo proactivo de amenazas y respuesta ante incidentes para infraestructura gubernamental.",
|
| 74 |
+
buyer="Ministerio del Interior",
|
| 75 |
+
status="Abierta",
|
| 76 |
+
closing_date=(datetime.now() + timedelta(days=30)).strftime("%Y-%m-%d"),
|
| 77 |
+
estimated_amount=520000000,
|
| 78 |
+
region="Nacional",
|
| 79 |
+
sector="Ciberseguridad",
|
| 80 |
source="Mercado Público"
|
| 81 |
)
|
| 82 |
]
|
| 83 |
for t in tenders:
|
| 84 |
db.add(t)
|
| 85 |
|
| 86 |
+
# 3. Pre-Analyzed History (To show the results immediately)
|
| 87 |
history = AnalysisHistoryModel(
|
| 88 |
+
tender_code="5021-10-LP24",
|
| 89 |
+
tender_name="Plataforma de IA para Análisis de Datos Criminalísticos",
|
| 90 |
decision="Recommended",
|
| 91 |
+
score=92,
|
| 92 |
+
summary="Oportunidad estratégica de alto valor. Tenemos el stack tecnológico (Gemini, Python) y la experiencia previa en seguridad ciudadana.",
|
| 93 |
+
risks='''[
|
| 94 |
+
{"severity": "High", "description": "Requisito de disponibilidad 99.9% 24/7"},
|
| 95 |
+
{"severity": "Medium", "description": "Integración con bases de datos legacy de Carabineros"},
|
| 96 |
+
{"severity": "Low", "description": "Plazo de entrega de la Fase 1 en 45 días"}
|
| 97 |
+
]''',
|
| 98 |
+
technical_analysis="Factibilidad técnica excelente. Podemos usar la arquitectura de agentes que ya tenemos implementada.",
|
| 99 |
+
legal_analysis="Cumplimos con todos los seguros y garantías solicitadas en el artículo 4.2 de las bases.",
|
| 100 |
+
commercial_analysis="ROI estimado del 35%. Es un proyecto insignia para nuestro portafolio de IA.",
|
| 101 |
+
proposal_draft="Nuestra propuesta se basa en una arquitectura de microservicios escalable, utilizando modelos de lenguaje avanzados para el procesamiento de texto y redes neuronales para visión...",
|
| 102 |
+
report_markdown="# Executive Report: AI Platform Crime Analysis\n\n## Summary\nThis tender is a perfect match for AndesOps AI.\n\n## Key Recommendations\n1. Focus the proposal on the 'Safety-First' approach.\n2. Highlight our speed of development using AI Agents.",
|
| 103 |
+
created_at=datetime.now() - timedelta(hours=5)
|
| 104 |
)
|
| 105 |
db.add(history)
|
| 106 |
|
| 107 |
db.commit()
|
| 108 |
+
print("Database seeded with high-quality Software Tenders!")
|
| 109 |
db.close()
|
| 110 |
|
| 111 |
if __name__ == "__main__":
|