Merge branch 'version_three' of http://23.29.118.76:3000/bolade/Anton_wireframe into version_three
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from pathlib import Path
|
||||
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 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
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class ReportGenerator:
|
||||
context["compatibility_score"] = self._calculate_compatibility_score(
|
||||
investor_data, project_data
|
||||
)
|
||||
|
||||
|
||||
context["match_criteria"] = self._generate_match_criteria(
|
||||
investor_data, project_data
|
||||
)
|
||||
@@ -99,8 +99,7 @@ class ReportGenerator:
|
||||
"sector": 30,
|
||||
"stage": 30,
|
||||
"geography": 20,
|
||||
"check_size": 15,
|
||||
"thesis": 5,
|
||||
"check_size": 20,
|
||||
}
|
||||
|
||||
# Aggregate data from all funds
|
||||
@@ -169,9 +168,6 @@ class ReportGenerator:
|
||||
if check_match:
|
||||
score += weights["check_size"]
|
||||
|
||||
# Thesis alignment (simplified)
|
||||
score += weights["thesis"]
|
||||
|
||||
return min(score, 100)
|
||||
|
||||
def _generate_match_criteria(
|
||||
@@ -297,8 +293,6 @@ class ReportGenerator:
|
||||
cr["lower"] <= project_val <= cr["upper"] for cr in check_ranges
|
||||
)
|
||||
check_match = "Perfect" if match_found else "Mismatch"
|
||||
elif project_val > 0:
|
||||
check_match = "Strong"
|
||||
|
||||
criteria.append(
|
||||
{
|
||||
@@ -308,19 +302,7 @@ class ReportGenerator:
|
||||
else "N/A",
|
||||
"evidence": check_evidence,
|
||||
"match": check_match,
|
||||
"weight": "15%",
|
||||
}
|
||||
)
|
||||
|
||||
# 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%",
|
||||
"weight": "20%",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user