Skip to content

feat: add question visualization GUI #113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KonstantinosKorovesis
Copy link

@KonstantinosKorovesis KonstantinosKorovesis commented Jun 4, 2025

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

  • New feature (non-breaking change which adds functionality)

Testing

I have added some basic tests to ensure the draw functions run without error and that empty input exits program correctly.

  • test_draw_cosine_similarity_matrix: make sure the draw_cosine_similarity_matrix function runs without error, with mock ax and canvas objects
  • test_draw_clusters_scatter_plot: make sure the draw_clusters_scatter_plot function runs without error, with mock ax and canvas objects
  • test_draw_network_graph: make sure the draw_network_graph function runs without error, with mock ax and canvas objects
  • test_empty_questions: check that empty input through the entry point function leads to the appropriate system exit

The Harmony API still runs with the introduced changes, since they implement a separate feature and do not affect existing functionality.

Test Configuration

  • Library version: current Harmony version (1.0.3)
  • OS: Windows 10
  • Toolchain: unittest, unittest.mock

Checklist

  • My PR is for one issue, rather than for multiple unrelated fixes.
  • My code follows the style guidelines of this project. I have applied a Linter (recommended: Pycharm's code formatter) to make my whitespace consistent with the rest of the project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • The Harmony API is not broken by my change to the Harmony Python library
  • I add third party dependencies only when necessary. If I changed the requirements, it changes in requirements.txt, pyproject.toml and also in the requirements.txt in the API repo
  • If I introduced a new feature, I documented it (e.g. making a script example in the script examples repository so that people will know how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant