openwisp / openwisp/netdiff

Provide a function to generate NetworkGraph

Open
#90 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
86
Forks
43
Avg merge
6h 1m
Merged PRs (30d)
6

Description

The _netjson_networkgraph function is used to generate a NetJSON NetworkGraph.

https://github.com/openwisp/netdiff/blob/master/netdiff/utils.py#L127

Right now it is more like an internal function. It would be nice providing it to the module users so that they don't have to reinvent the wheel so much.

For example, in openwisp-network-topology, the json method of the Topology model is already reinventing it:

https://github.com/openwisp/openwisp-network-topology/blob/fac83331cee7194aef4ba92f0a5fa067d3597aac/openwisp_network_topology/base/topology.py#L139-L169

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with _netjson_networkgraph in netdiff/utils.py around line 127, then compare its behavior with the duplicated logic in openwisp-network-topology's topology.py json method. Confirm the intended public entry point and output against the existing NetJSON NetworkGraph behavior; done means module users can call the exposed functionality without reimplementing it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.