Skip to content

Network Explorer: Manual moving of points#293

Open
janezd wants to merge 2 commits into
biolab:masterfrom
janezd:explorer-manual-positioning
Open

Network Explorer: Manual moving of points#293
janezd wants to merge 2 commits into
biolab:masterfrom
janezd:explorer-manual-positioning

Conversation

@janezd

@janezd janezd commented May 21, 2026

Copy link
Copy Markdown
Contributor
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
  • Code changes
  • Tests
  • Documentation

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 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_hint widget setting, compute an edge-matrix hash, and reuse stored positions when the same network is re-sent.
  • Add a set_coordinates method 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]] = \
Comment thread orangecontrib/network/widgets/OWNxExplorer.py
Comment thread setup.py
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
@janezd janezd changed the title Explorer manual moving of points Network Explorer: Manual moving of points May 21, 2026
@janezd janezd force-pushed the explorer-manual-positioning branch 2 times, most recently from 5ee4a2a to d9bb1fb Compare May 21, 2026 12:03
@janezd janezd force-pushed the explorer-manual-positioning branch from d9bb1fb to 65965a9 Compare May 22, 2026 09:44
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: Manual moving of points

3 participants