snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.16k stars 797 forks source link

File Size and Insights #179

Closed williamzhuk closed 4 years ago

williamzhuk commented 4 years ago

The code for snap.py is located in a single file, 7.05 MB long as of this time. This, paired with the python swig under the hood, makes it not very readable to human eyes and lacking most of the implementation details. The comments are only descriptors of parameters and nothing else.

A 7 MB file is too big for most code insight tools. These tools are very commonly used in real-world applications since it speeds up development by helping auto-complete method names and checking argument types roughly match the method signature.

It would be nice to split this file into smaller pieces related to specific parts of the SNAP library for code insight and changing the comments to actually mention what the method does or at least point a link toward documentation.

roks commented 4 years ago

The code for snap.py is computer generated by SWIG. For smaller pieces and documented code, please check out the C++ version.