Merge branch 'version_three' of http://23.29.118.76:3000/bolade/Anton_wireframe into version_three

This commit is contained in:
2025-10-28 23:31:13 +00:00
+4 -22
View File
@@ -1,11 +1,11 @@
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List, Optional from typing import Any, Dict, List, Optional
# Import database models and compatibility score service
from db.models import InvestorTable, ProjectTable
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
from playwright.async_api import async_playwright from playwright.async_api import async_playwright
# Import database models and compatibility score service
from db.models import InvestorTable, ProjectTable
from services.compatibility_score import calculate_project_investor_compatibility from services.compatibility_score import calculate_project_investor_compatibility
@@ -99,8 +99,7 @@ class ReportGenerator:
"sector": 30, "sector": 30,
"stage": 30, "stage": 30,
"geography": 20, "geography": 20,
"check_size": 15, "check_size": 20,
"thesis": 5,
} }
# Aggregate data from all funds # Aggregate data from all funds
@@ -169,9 +168,6 @@ class ReportGenerator:
if check_match: if check_match:
score += weights["check_size"] score += weights["check_size"]
# Thesis alignment (simplified)
score += weights["thesis"]
return min(score, 100) return min(score, 100)
def _generate_match_criteria( def _generate_match_criteria(
@@ -297,8 +293,6 @@ class ReportGenerator:
cr["lower"] <= project_val <= cr["upper"] for cr in check_ranges cr["lower"] <= project_val <= cr["upper"] for cr in check_ranges
) )
check_match = "Perfect" if match_found else "Mismatch" check_match = "Perfect" if match_found else "Mismatch"
elif project_val > 0:
check_match = "Strong"
criteria.append( criteria.append(
{ {
@@ -308,19 +302,7 @@ class ReportGenerator:
else "N/A", else "N/A",
"evidence": check_evidence, "evidence": check_evidence,
"match": check_match, "match": check_match,
"weight": "15%", "weight": "20%",
}
)
# Thesis criterion
thesis = investor_data.get("investment_thesis", [])
criteria.append(
{
"name": "Thesis",
"requirement": "Founder-led, ESG focus",
"evidence": ", ".join(thesis[:2]) if thesis else "Entrepreneur-led",
"match": "Strong",
"weight": "5%",
} }
) )