biolab / biolab/orange3-network

Save Network: save the same as in NetworkX

Open
#275 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
42
Forks
33
PR merge metrics
No merged PRs in 30d

Description

##### Network version

1.9.0

##### Orange version

3.37.0

##### Expected behavior
Save Network saves the data (attributes) in the same way as etworkX would. See below.
Screenshot 2024-07-15 at 10 32 06

##### Actual behavior
The data is saved as such. Orange can't read what it saves (attributes not loaded properly). NetworkX can't read what Orange saves. Also, Orange can't read what NetworkX saves.
![Uploading Screenshot 2024-07-15 at 10.39.39.png…]()

##### Steps to reproduce the behavior
import networkx as nx

# Create a graph
```
G = nx.Graph()

# Add nodes with attributes
G.add_node(1, name='Alice', age="30")
G.add_node(2, name='Bob', age="25")
G.add_node(3, name='Charlie', age="35")
G.add_node(4, name='David', age="40")

# Add edges
G.add_edge(1, 2)
G.add_edge(1, 3)
G.add_edge(2, 3)
G.add_edge(3, 4)

nx.write_pajek(G, "simple_network.net")
```

##### Additional info (worksheets, data, screenshots, ...)
While pajek doesn't have a documentation on its format (from what I know), it would be nice to have the format transferable between NetworkX and Orange. Or at the very least for Orange to properly read the data it saves.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Save Network widget and reproduce the issue with the provided NetworkX snippet. Compare the generated Pajek data with what Orange reads and what NetworkX writes; done means Orange and NetworkX can exchange node attributes and Orange can read its own saved data correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.