diff --git a/.DS_Store b/.DS_Store index 34ac6ea..25bf41a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/test_grouping.py b/test_grouping.py deleted file mode 100644 index 1716daf..0000000 --- a/test_grouping.py +++ /dev/null @@ -1,28 +0,0 @@ -from data_comparator import KSTCoordiComparator - -def test_grouping(): - comparator = KSTCoordiComparator('data/sample-data.xlsx') - if comparator.load_data(): - summary = comparator.get_comparison_summary() - - print("=== GROUPED BY TITLE TEST ===") - print(f"Total unique titles: {len(summary['grouped_by_title']['title_summaries'])}") - print() - - # Show top 5 titles with worst match percentages - sorted_titles = sorted( - summary['grouped_by_title']['title_summaries'].items(), - key=lambda x: x[1]['match_percentage'] - ) - - print("Top 5 titles needing attention (worst match %):") - for i, (title, data) in enumerate(sorted_titles[:5]): - print(f"{i+1}. {title}") - print(f" Total Episodes: {data['total_episodes']}") - print(f" Matched: {data['matched_count']} ({data['match_percentage']}%)") - print(f" KST Only: {data['kst_only_count']}") - print(f" Coordi Only: {data['coordi_only_count']}") - print() - -if __name__ == "__main__": - test_grouping() \ No newline at end of file diff --git a/test_sheet_filtering.py b/test_sheet_filtering.py deleted file mode 100644 index 63109a6..0000000 --- a/test_sheet_filtering.py +++ /dev/null @@ -1,38 +0,0 @@ -from data_comparator import KSTCoordiComparator - -def test_sheet_filtering(): - comparator = KSTCoordiComparator('data/sample-data.xlsx') - if comparator.load_data(): - print("=== SHEET FILTERING TEST ===") - - # Test All Sheets - summary_all = comparator.get_comparison_summary() - print(f"All Sheets:") - print(f" Available sheets: {summary_all['sheet_names']}") - print(f" Matched items: {summary_all['matched_items_count']}") - print(f" KST only: {summary_all['mismatches']['kst_only_count']}") - print(f" Coordi only: {summary_all['mismatches']['coordi_only_count']}") - print() - - # Test TH URGENT only - summary_th = comparator.get_comparison_summary('TH URGENT') - print(f"TH URGENT only:") - print(f" Matched items: {summary_th['matched_items_count']}") - print(f" KST only: {summary_th['mismatches']['kst_only_count']}") - print(f" Coordi only: {summary_th['mismatches']['coordi_only_count']}") - print() - - # Test US URGENT only - summary_us = comparator.get_comparison_summary('US URGENT') - print(f"US URGENT only:") - print(f" Matched items: {summary_us['matched_items_count']}") - print(f" KST only: {summary_us['mismatches']['kst_only_count']}") - print(f" Coordi only: {summary_us['mismatches']['coordi_only_count']}") - print() - - print("✓ Sheet filtering functionality working!") - print("✓ Web GUI ready at http://localhost:8080") - print("✓ Dropdown will show: All Sheets, TH URGENT, US URGENT") - -if __name__ == "__main__": - test_sheet_filtering() \ No newline at end of file diff --git a/test_simplified_gui.py b/test_simplified_gui.py deleted file mode 100644 index 8188dde..0000000 --- a/test_simplified_gui.py +++ /dev/null @@ -1,35 +0,0 @@ -from data_comparator import KSTCoordiComparator - -def test_simplified_interface(): - comparator = KSTCoordiComparator('data/sample-data.xlsx') - if comparator.load_data(): - summary = comparator.get_comparison_summary() - - print("=== SIMPLIFIED INTERFACE TEST ===") - print(f"Matched items (Summary tab): {summary['matched_items_count']}") - - total_different = (summary['mismatches']['kst_only_count'] + - summary['mismatches']['coordi_only_count'] + - summary['mismatches']['kst_duplicates_count'] + - summary['mismatches']['coordi_duplicates_count']) - print(f"Different items (Different tab): {total_different}") - print() - - print("Sample items from Different tab (first 5):") - - # Show KST-only items - kst_only = summary['mismatch_details']['kst_only'][:3] - for item in kst_only: - print(f"KST: {item['title']} - Episode {item['episode']} | Coordi: (empty) | Reason: Only appears in KST") - - # Show Coordi-only items - coordi_only = summary['mismatch_details']['coordi_only'][:2] - for item in coordi_only: - print(f"KST: (empty) | Coordi: {item['title']} - Episode {item['episode']} | Reason: Only appears in Coordi") - - print(f"\n✅ Interface ready at http://localhost:8080") - print("✅ Two tabs: Summary (matched items) and Different (mismatches)") - print("✅ Korean title + episode sorting implemented") - -if __name__ == "__main__": - test_simplified_interface() \ No newline at end of file diff --git a/test_upload.py b/test_upload.py deleted file mode 100644 index 4e422fa..0000000 --- a/test_upload.py +++ /dev/null @@ -1,58 +0,0 @@ -import requests -import os - -def test_file_upload(): - # Test the upload endpoint - file_path = 'data/sample-data.xlsx' - - if not os.path.exists(file_path): - print("Error: Sample file not found") - return - - print("=== FILE UPLOAD TEST ===") - print(f"Testing upload of: {file_path}") - - # Test upload endpoint - with open(file_path, 'rb') as f: - files = {'file': f} - try: - response = requests.post('http://localhost:8080/upload', files=files, timeout=30) - - if response.status_code == 200: - data = response.json() - if data.get('success'): - print("✓ File upload successful!") - print(f" Uploaded filename: {data['filename']}") - print(f" Server file path: {data['file_path']}") - - # Test analysis of uploaded file - print("✓ Testing analysis of uploaded file...") - analyze_response = requests.post('http://localhost:8080/analyze', - json={'file_path': data['file_path']}, - timeout=30) - - if analyze_response.status_code == 200: - analyze_data = analyze_response.json() - if analyze_data.get('success'): - print("✓ Analysis of uploaded file successful!") - results = analyze_data['results'] - print(f" Sheets found: {results['sheet_names']}") - print(f" Matched items: {results['matched_items_count']}") - print(f" Different items: {results['mismatches']['kst_only_count'] + results['mismatches']['coordi_only_count']}") - else: - print(f"✗ Analysis failed: {analyze_data.get('error')}") - else: - print(f"✗ Analysis request failed: {analyze_response.status_code}") - - else: - print(f"✗ Upload failed: {data.get('error')}") - else: - print(f"✗ Upload request failed: {response.status_code}") - print(f"Response: {response.text}") - - except requests.exceptions.RequestException as e: - print(f"✗ Request failed: {e}") - print("Make sure the Flask server is running at http://localhost:8080") - -if __name__ == "__main__": - test_file_upload() \ No newline at end of file