extend networkx

Aperta
#188 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python

Direzione di ricerca

Start with the issue's two use cases and the proposed networkx DiGraph overrides: add_node, add_edge, and add_edge_from. Determine how streamz graphs are currently represented and how NetworkX compose and predecessor inspection should behave. Done means modular graphs can be composed while preserving intended node connections and exposing unmatched names for inspection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Networkx provides many great tools for inspection, analysis, and manipulation of graphs. It might be nice to be able to use these tools when working with streamz.

Use Cases:
UC1:

  1. User1 writes a graph (graph1) to perform some analysis
  2. User2 would like to extend this analysis so they write a new pipeline (graph2) with dummy parent nodes with the same name as the nodes from graph1.
  3. User2 then uses graph3 = nx.compose(graph2, graph1). Graph3 has nodes from both graphs allowing the graphs themselves to be built modularly.

UC2:

  1. User3 suspects something went wrong in the compose step because of a name mismatch. User3 uses [f for f in graph3 if nx.predecessors(f) ==0] to find all the nodes with no parents. User3 then looks through the list and finds a node who's name didn't match and thus was not linked properly.

I think this can be done via a subclass of nx.DiGraph with select methods overridden, namely:

  1. add_node which now needs to take in a node class, args and kwargs and a name
  2. add_edge which now need to take in either
    1. two node classes with args and kwargs (producing two new nodes)
    2. a node class with args and kwargs and a name
    3. two names
  3. add_edge_from so compose works properly.

Most of the overrides either need to init new nodes or provide connections between nodes.

Lingua principale
Python
Stelle
1.3k
Fork
149
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-streamz/streamz

Tutte le issue di python-streamz/streamz

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.