feat: add question visualization GUI#113
Conversation
|
Hey @KonstantinosKorovesis — this is a really nice addition! The feature looks well through out and the structure is clean overall. Just one small thing before we can merge: the CI is failing during the python -m build step, and it looks like it’s because tkinter, matplotlib, and networkx are being imported at the top of the visualize_questions_gui.py file. Since the build runs in a headless environment, those GUI-related imports tend to cause issues even if they’re wrapped in a try/except. Quick fix: If you move those imports inside the relevant functions (like setup_gui() or wherever they’re used), that should prevent them from loading during build time and should fix the CI error. Once that’s done, happy to re-run the workflow and get this merged in! Let me know if you’d like a hand with restructuring — happy to help. |
Description
This contribution introduces an interactive Tkinter-based GUI for analyzing question similarity. Through the GUI, users can see the following graphs: Cosine similarity matrix (heatmap), Cluster scatter plot (K-Means or Affinity Propagation based on the number of given questions) and Network graph. Users can also add new questions and display all current questions.
Note: This feature's additional dependencies (tkinter, matplotlib, networkx) are intentionally excluded from requirements.txt since they are not core requirements for the library. This GUI aims to provide an additional optional way to visualize and manage instrument questions without impacting the core package's minimal dependencies.
Fixes
No existing issue was fixed.
Type of change
Testing
I have added some basic tests to ensure the draw functions run without error and that empty input exits program correctly.
The Harmony API still runs with the introduced changes, since they implement a separate feature and do not affect existing functionality.
Test Configuration
Checklist
requirements.txt,pyproject.tomland also in therequirements.txtin the API repo