Skip to content

Network Explorer: Save network positions hint - #292

Merged
VesnaT merged 3 commits into
biolab:masterfrom
janezd:save-network-positions
May 22, 2026
Merged

VesnaT merged 3 commits into
biolab:masterfrom
janezd:save-network-positions

Conversation

@janezd

@janezd janezd commented May 19, 2026

Copy link
Copy Markdown
Contributor
Issue

Resolves #251.

Description of changes

Store the current positions of nodes as a hint, together with a hash of edge matrix. When the widget receives the same network, it uses the stored positions instead of rerunning the optimization.

Tests check that the hint is used when removing and re-adding a signal, while the actual intended benefit of this is to retrieve optimized positions from a stored workflow.

Includes
  • Code changes
  • Tests

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds schema-stored network layout position hints so Network Explorer can reuse optimized node coordinates when receiving the same network again.

Changes:

  • Adds a positions_hint setting and edge-matrix hash generation.
  • Reuses stored positions when node count and edge hash match.
  • Adds a test covering hint reuse and invalidation when the network changes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
orangecontrib/network/widgets/OWNxExplorer.py Stores/restores layout positions using an edge hash.
orangecontrib/network/widgets/tests/test_OWNxExplorer.py Adds regression coverage for position hint reuse.

馃挕 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread orangecontrib/network/widgets/OWNxExplorer.py Outdated
Comment thread orangecontrib/network/widgets/OWNxExplorer.py Outdated
@janezd
janezd force-pushed the save-network-positions branch 3 times, most recently from 0beffde to 59faa5d Compare May 19, 2026 21:29
@janezd janezd mentioned this pull request May 21, 2026
1 of 3 tasks
@janezd
janezd force-pushed the save-network-positions branch from 59faa5d to 93a800a Compare May 21, 2026 12:02
@VesnaT
VesnaT merged commit b5c4b6f into biolab:master May 22, 2026
14 checks passed
janezd pushed a commit to janezd/orange3-network that referenced this pull request May 22, 2026
Network Explorer: Save network positions hint
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.

Network Explorer should remember the vertex coordinates in settings

3 participants