-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_trash_consolidation.py
More file actions
84 lines (66 loc) · 2.97 KB
/
Copy pathdebug_trash_consolidation.py
File metadata and controls
84 lines (66 loc) · 2.97 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env python3
"""
Debug script to examine trash build consolidation.
"""
import asyncio
import json
from src.eso_build_o_rama.trial_scanner import TrialScanner
async def debug_trash_consolidation():
"""Debug trash build consolidation."""
# Initialize scanner
scanner = TrialScanner()
try:
# Load trial data
with open('data/trials.json', 'r') as f:
trials_data = json.load(f)
# Find Aetherian Archive trial
aa_trial = None
for trial in trials_data['trials']:
if trial['name'] == 'Aetherian Archive':
aa_trial = trial
break
if not aa_trial:
print("Aetherian Archive trial not found!")
return
# Scan Aetherian Archive
print("Scanning Aetherian Archive...")
all_reports = await scanner.scan_all_trials([aa_trial])
# Get publishable builds
print("Getting publishable builds...")
publishable_builds = await scanner.get_publishable_builds(all_reports)
print(f"Total publishable builds: {len(publishable_builds)}")
# Check for trash builds
trash_builds = [build for build in publishable_builds if build.boss_name == "Trash Builds"]
print(f"Trash builds in publishable: {len(trash_builds)}")
# Check all builds to see what boss names exist
boss_names = set()
for build in publishable_builds:
boss_names.add(build.boss_name)
print(f"Boss names in publishable builds: {sorted(boss_names)}")
# Check if there are any trash builds that didn't make it to publishable
all_trash_reports = []
for trial_name, reports in all_reports.items():
for report in reports:
if report.boss_name == "Trash Builds":
all_trash_reports.append(report)
print(f"Total trash reports found: {len(all_trash_reports)}")
if all_trash_reports:
print("Trash reports details:")
for i, report in enumerate(all_trash_reports):
print(f" Report {i+1}: {report.report_code}")
print(f" Players: {len(report.all_players)}")
print(f" Common builds: {len(report.common_builds)}")
# Check common builds
for build in report.common_builds:
print(f" Build: {build.build_slug}")
print(f" Count: {build.count}")
print(f" Best player role: {build.best_player.role if build.best_player else 'None'}")
print(f" Meets threshold: {build.meets_threshold()}")
except Exception as e:
print(f"Error: {e}")
import traceback
traceback.print_exc()
finally:
await scanner.close()
if __name__ == "__main__":
asyncio.run(debug_trash_consolidation())