""" 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! """)