Repository navigation
Expand file tree
/
Copy pathtest_components.py
More file actions
48 lines (42 loc) Β· 2.14 KB
/
Copy pathtest_components.py
File metadata and controls
48 lines (42 loc) Β· 2.14 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
"""Simple test - check each graph individually without API keys"""
import asyncio
from src.tools.scraping.yc_scraper import YCCompanyScraper
from src.tools.calculation import VCMetricsCalculator
async def test_components():
print('π§ͺ Testing individual components...\n')
# Test scraper
print('1οΈβ£ Testing YC Scraper...')
scraper = YCCompanyScraper()
result = await scraper.scrape('https://www.ycombinator.com/companies/stripe')
print(f' β
Scraped: {result.get("company_name", "Unknown")}')
print(f' π Batch: {result.get("batch")}, Founded: {result.get("founded_year")}')
print(f' π₯ Team: {result.get("team_size")} employees')
print(f' π Social links: {len(result.get("social_links", []))}')
# Test calculator
print('\n2οΈβ£ Testing VC Metrics Calculator...')
calc = VCMetricsCalculator()
burn = calc.calculate_burn_rate(50000, 10000)
runway = calc.calculate_runway_months(100000, burn)
growth = calc.calculate_growth_rate(120000, 100000)
print(f' β
Burn rate: ${burn:,.0f}/month')
print(f' π Runway: {runway} months')
print(f' π Growth: {growth:.1f}%')
# Test imports
print('\n3οΈβ£ Testing system imports...')
from src.orchestration.investment_supervisor import create_investment_supervisor
print(' β
Supervisor imports')
from src.orchestration.graphs.entity_resolution import create_entity_resolution_graph
print(' β
Entity resolution imports')
from src.orchestration.graphs.diligence import create_diligence_graph
print(' β
Diligence imports')
from src.orchestration.graphs.sourcing import create_sourcing_graph
print(' β
Sourcing imports')
print('\nβ
ALL COMPONENTS WORKING!')
print('\nπ To test full workflow, you need:')
print(' - OPENAI_API_KEY for LLM routing')
print(' - FIRECRAWL_API_KEY for advanced scraping (optional)')
print(' - Database tables created (PostgreSQL migration)')
print('\nπ― Demo script works perfectly without API keys!')
print(' Run: python3 demo_complete_auto.py')
if __name__ == '__main__':
asyncio.run(test_components())