#!/usr/bin/env python3 """Debug the two failing tests""" from app import ATSCompatibilityAnalyzer analyzer = ATSCompatibilityAnalyzer() # Issue 1: Chef resume for ML role chef_resume = """ Chef John Smith Executive Chef | Le Restaurant | 2015-2023 • Created award-winning French cuisine menus • Managed kitchen staff of 20 • Sourced local organic ingredients Skills: French cuisine, pastry, wine pairing Education: Culinary Institute of America """ ml_jd = "Machine Learning Engineer with PhD, PyTorch, TensorFlow experience" print("=" * 60) print("DEBUG: Chef Resume for ML Role") print("=" * 60) result = analyzer.analyze(chef_resume, ml_jd) print(f"\nTotal Score: {result['total_score']}%") print("\nBreakdown:") for metric, score in result['breakdown'].items(): weight = analyzer.weights[metric] print(f" {metric:20} = {score:5.1f}% × {weight:.2f} = {score * weight:5.1f}") print("\n" + "=" * 60) print("DEBUG: Valid Resume Word Count") print("=" * 60) valid_resume = """ John Doe | john@email.com | 555-123-4567 EXPERIENCE Software Engineer | TechCorp | 2020 - Present • Developed Python applications • Built REST APIs • Managed databases SKILLS Python, JavaScript, SQL EDUCATION BS Computer Science | 2019 """ word_count = len(valid_resume.strip().split()) char_count = len(valid_resume.strip()) print(f"\nResume characters: {char_count}") print(f"Resume words: {word_count}") print(f"\nThreshold: 100 chars and 20 words") print(f"Pass chars: {char_count >= 100}") print(f"Pass words: {word_count >= 20}")