Network File and Explorer: Load data for edges; show colored and labelled edges#249
Network File and Explorer: Load data for edges; show colored and labelled edges#249janezd wants to merge 15 commits intobiolab:masterfrom
Conversation
ce1eab1 to
9553296
Compare
773e9a1 to
6e719cb
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #249 +/- ##
==========================================
+ Coverage 73.34% 77.40% +4.06%
==========================================
Files 21 26 +5
Lines 2975 3581 +606
==========================================
+ Hits 2182 2772 +590
- Misses 793 809 +16
☔ View full report in Codecov by Sentry. |
513920f to
1e2cc1a
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands Orange3-Network’s network IO and visualization capabilities by (1) supporting edge labels in Pajek-like .net files and (2) allowing networks to be constructed/annotated from input node/edge tables, with corresponding UI updates in Network File and Network Explorer.
Changes:
- Added
network.composeutilities and integrated them intoOWNxFileto construct/annotate networks from input tables (including edge-table matching). - Updated
OWNxExplorer+GraphViewto support selecting edge label/color/width sources (including “Weights”) and render per-edge colors/widths/labels. - Added/updated extensive tests, sample network/data files, and documentation/i18n strings.
Reviewed changes
Copilot reviewed 18 out of 28 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| orangecontrib/network/widgets/tests/test_ownxsinglemode.py | Adjust test to avoid mutating shared node table state. |
| orangecontrib/network/widgets/tests/test_OWNxFile.py | Major new test coverage for new OWNxFile behaviors (items/edges inputs, hints, composing, warnings/errors). |
| orangecontrib/network/widgets/tests/test_OWNxExplorer.py | Update tests for new edge-label selection mechanism (“Weights”). |
| orangecontrib/network/widgets/tests/networks/test-compose.net | Adds a test network used by new widget flow tests. |
| orangecontrib/network/widgets/OWNxFile.py | Adds “construct from inputs” mode; edge input; hint-based variable persistence; edge annotation matching; reporting updates. |
| orangecontrib/network/widgets/OWNxExplorer.py | Adds edge label/color/width controls + hint persistence; supplies edge labels/widths/colors to GraphView. |
| orangecontrib/network/widgets/graphview.py | Adds per-edge color support; refactors edge width/label rendering to query widget for labels/widths/colors. |
| orangecontrib/network/networks/stations.xlsx | Adds a bundled dataset (binary). |
| orangecontrib/network/networks/railway.xlsx | Adds a bundled dataset (binary). |
| orangecontrib/network/networks/railway.net | Adds a bundled sample network file. |
| orangecontrib/network/networks/lastfm.tab | Updates bundled tab metadata (class header row). |
| orangecontrib/network/network/tests/towns.net | Adds a test network with edge labels for read/write tests. |
| orangecontrib/network/network/tests/test-arcslist.net | Adds a Pajek arcslist test fixture. |
| orangecontrib/network/network/tests/test_twomode.py | Adds tests for two-mode to single-mode conversion/weighting. |
| orangecontrib/network/network/tests/test_readwrite.py | Switch to importlib.resources for packaged fixtures; adds edge-label read test. |
| orangecontrib/network/network/tests/test_embeddings.py | Adds Node2Vec tests gated on gensim availability. |
| orangecontrib/network/network/tests/test_compose.py | Adds unit tests for new compose utilities (tables → network). |
| orangecontrib/network/network/tests/init.py | Present in PR listing (no functional changes shown). |
| orangecontrib/network/network/readwrite.py | Extends edge parsing to support non-numeric edge labels (returns edge_data alongside weights). |
| orangecontrib/network/network/compose.py | New module: construct networks from node/edge tables; validation helpers and errors. |
| orangecontrib/network/network/base.py | Updates edge-data documentation; adjusts undirected twoway-edge computation behavior. |
| i18n/si/msgs.jaml | Adds new strings for compose + updated widget UI/labels. |
| doc/widgets/networkfile.md | Updates widget docs for new inputs and “construct from tables” workflow. |
| doc/widgets/networkexplorer.md | Updates explorer docs to match new UI layout and edge controls. |
| doc/widgets/images/Network-File-stamped.png | Adds/updates widget screenshot (binary). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Issue
Resolves #247.
Description of changes
Includes