Minor bug fixes

This commit is contained in:
Harishankaran K 2025-10-02 18:05:29 +05:30
parent 180fa9cc47
commit 56ecdaceee
3 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View file

@ -6,6 +6,7 @@ run/*.pdf
test_*.py
cache/
resume_evaluations.csv
greenhouse_resumes/*
# Byte-compiled / optimized / DLL files
__pycache__/

View file

@ -6,6 +6,7 @@ from pathlib import Path
from typing import Dict, List, Optional, Any
from models import GitHubProfile
from pdf import logger
from prompts.template_manager import TemplateManager
from prompt import DEFAULT_MODEL, MODEL_PARAMETERS
from llm_utils import initialize_llm_provider, extract_json_from_response
@ -80,6 +81,7 @@ def extract_github_username(github_url: str) -> Optional[str]:
def fetch_github_profile(github_url: str) -> Optional[GitHubProfile]:
try:
username = extract_github_username(github_url)
logger.info(f"{username}")
if not username:
print(f"Could not extract username from: {github_url}")
return None
@ -111,7 +113,7 @@ def fetch_github_profile(github_url: str) -> Optional[GitHubProfile]:
print(f"GitHub user not found: {username}")
return None
else:
print(f"GitHub API error: {response.status_code} - {response.text}")
print(f"GitHub API error: {status_code} - {data}")
return None
except requests.exceptions.RequestException as e:
@ -398,6 +400,7 @@ def generate_projects_json(projects: List[Dict]) -> List[Dict]:
def fetch_and_display_github_info(github_url: str) -> Dict:
logger.info(f"{github_url}")
github_profile = fetch_github_profile(github_url)
if not github_profile:
print("\n❌ Failed to fetch GitHub profile details.")

View file

@ -246,7 +246,7 @@ class EvaluationData(BaseModel):
bonus_points: BonusPoints
deductions: Deductions
key_strengths: List[str] = Field(min_items=1, max_items=5)
areas_for_improvement: List[str] = Field(min_items=1, max_items=3)
areas_for_improvement: List[str] = Field(min_items=1, max_items=5)
class GitHubProfile(BaseModel):