File size: 2,218 Bytes
329d553
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""

Quick verification that the code changes are present

"""

import sys
import inspect

print("="*80)
print("VERIFYING CODE CHANGES ARE PRESENT")
print("="*80)

# Import the module
from visualization.plot_generator import PlotGenerator

# Check if the new method exists
print("\n1. Checking if compute_category_correlation_method2 exists...")
if hasattr(PlotGenerator, 'compute_category_correlation_method2'):
    print("   [OK] YES! Method exists")
else:
    print("   [ERROR] NO! Method NOT found - code changes not applied!")
    sys.exit(1)

# Check the method signature
print("\n2. Checking method signature...")
method = getattr(PlotGenerator, 'compute_category_correlation_method2')
sig = inspect.signature(method)
print(f"   Signature: {sig}")
print("   [OK] Method is present with correct signature")

# Check if generate_scatter has the new code
print("\n3. Checking if generate_scatter has Method 2 logic...")
source = inspect.getsource(PlotGenerator.generate_scatter)

if "compute_category_correlation_method2" in source:
    print("   [OK] YES! generate_scatter calls compute_category_correlation_method2")
else:
    print("   [ERROR] NO! generate_scatter doesn't call the new method!")
    sys.exit(1)

if "METHOD 2" in source:
    print("   [OK] YES! Method 2 debug messages are present")
else:
    print("   [ERROR] NO! Method 2 debug messages not found!")

if "DEBUG generate_scatter" in source:
    print("   [OK] YES! Debug output is present")
else:
    print("   [WARNING] Debug output not found (might have been removed)")

print("\n" + "="*80)
print("VERIFICATION COMPLETE")
print("="*80)

print("""

[OK] All checks passed!



The code changes ARE present in the loaded module.



If the GUI still shows old numbers:

  1. Make sure you FULLY restarted the app (Ctrl+C, then python app.py)

  2. Check the console output for [DEBUG generate_scatter] messages

  3. If you see debug output but wrong numbers, there might be another issue



If you DON'T see [DEBUG generate_scatter] in the console when using the GUI,

it means generate_scatter isn't being called (maybe cached somewhere).



Next step: Restart the app and try again!

""")