Skip to content

[pull] master from GiulioRossetti:master #16

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 199 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Oct 26, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Oct 26, 2022
GiulioRossetti and others added 30 commits May 29, 2024 13:22
Minor fix when a cluster has only two nodes
…ng tests

- Enhanced the `plot_network_clusters` function with support for interactive graph visualizations using the Pyvis library.
  - Introduced the `interractive` argument (default: `False`) to toggle between static and interactive modes.
  - Added support for saving interactive visualizations to an HTML file (`output_file` argument, default: "interactive.html").
  - Enabled dynamic handling of node sizes, labels, edge widths, and edge weights in the interactive mode.

- Updated the unit tests in `test_viz_network.py`:
  - Added `test_interactive_cluster` to validate interactive visualization generation.
  - Ensured that the generated HTML file is created and removed cleanly after the test.
- Updated dependencies across the project to include pyvis:
  - Added `pyvis` to `requirements.docs.txt` for documentation builds.
  - Added `pyvis` to `requirements.txt` for documentation builds.
  - Added `pyvis` to `environment.yml` for Conda environments.
  - Added `pyvis` to `conda/meta.yaml` for Conda packaging.

This ensures that the Pyvis library is properly integrated for supporting interactive graph visualizations.
…ctive functions

The network visualization code has been restructured to improve maintainability
and separation of concerns:
- Extract static matplotlib rendering into _draw_static_network()
- Extract interactive Pyvis rendering into _draw_interactive_network()
- Simplify main plot_network_clusters() function to handle common initialization
  and delegation

Benefits:
- Better code organization and reduced complexity
- Easier to maintain and debug each rendering mode separately
- Simplified testing of each visualization method
- Reduced cyclomatic complexity of main function

No breaking changes to the public API.
- Restructured networks.py for better readability and organization.
- Fixed and enhanced function documentation for improved clarity.
- Introduced physics buttons to control interactive graph behavior.
  - Added buttons to toggle physics simulation (e.g., enable/disable).
  - Enhanced user interaction by allowing physics adjustments in real-time.

- Implemented a selection menu for graph elements:
  - Added a dropdown menu for selecting nodes or clusters in the visualization.
  - Provided easy navigation and manipulation of graph elements.
Enhanced graphical visualization through the use of interactive displays (Pyvis)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants