Network Explorer: Manual moving of points#293
Open
janezd wants to merge 2 commits into
Open
Conversation
3 tasks
There was a problem hiding this comment.
Pull request overview
This PR extends the Network Explorer widget to persist and restore node coordinates using a stored “positions hint”, and adds plumbing intended to support manual point movement by updating underlying coordinates. It also includes minor I/O robustness improvements for Pajek read/write.
Changes:
- Add
positions_hintwidget setting, compute an edge-matrix hash, and reuse stored positions when the same network is re-sent. - Add a
set_coordinatesmethod to update the embedding when points are moved. - Open Pajek files with explicit UTF-8 encoding for consistent cross-platform behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
setup.py |
Changes the declared minimum supported Python version. |
orangecontrib/network/widgets/tests/test_OWNxExplorer.py |
Adds a regression test for position-hint reuse across re-sending inputs. |
orangecontrib/network/widgets/OWNxExplorer.py |
Implements positions hint storage/restoration, adds coordinate-setting hook, and hashes edges. |
orangecontrib/network/network/readwrite.py |
Forces UTF-8 encoding when reading/writing Pajek files. |
i18n/si/msgs.jaml |
Updates translation extraction metadata for the new utf-8 string occurrences. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| edge_label_variable_hint: Optional[str] = Setting(None, schema_only=True) | ||
| edge_color_variable_hint: Optional[str] = Setting(None, schema_only=True) | ||
|
|
||
| positions_hint: Optional[tuple[list[list[int, int]], str]] = \ |
| package_data=PACKAGE_DATA, | ||
| data_files=DATA_FILES, | ||
| python_requires=">=3.8", | ||
| python_requires=">=3.11", |
| from unittest.mock import Mock | ||
|
|
||
| import numpy as np | ||
| from AnyQt.QtTest import QSignalSpy |
5ee4a2a to
d9bb1fb
Compare
d9bb1fb to
65965a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Resolves #252. Based on #292.
This PR can be merged at any time after #292, but requires biolab/orange3#7286 to actually do something.
Includes