ELIFE-ASU / Neet

Simulating and analyzing dynamical network models
https://neet.readthedocs.io/en/stable
Other
4 stars 10 forks source link

Resolve #194 #195

Closed dglmoore closed 4 years ago

dglmoore commented 4 years ago

Description

Networks were losing lone nodes when convert the network networkx.DiGraph. This was fixed by explicitly adding all nodes to the network before adding edges. The reason this was necessary is the networkx.DiGraph initializer only adds endpoint nodes when you construct it with a list of edges. Since lone nodes have no edges, they were not included.

Fixes #194

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

We have not tested this for WTNetwork on account of #193.

Checklist:

codecov-io commented 4 years ago

Codecov Report

Merging #195 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #195      +/-   ##
==========================================
+ Coverage   99.13%   99.14%   +<.01%     
==========================================
  Files          16       16              
  Lines        1393     1397       +4     
==========================================
+ Hits         1381     1385       +4     
  Misses         12       12
Impacted Files Coverage Δ
neet/network.py 93.89% <100%> (+0.19%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5375822...c57d779. Read the comment docs.