Description
I took a look at PR #7 and wanted to share some thoughts for consideration:
-
Code Organization in
external.py
andmisc.py
:
I suggest keeping most of theBackend
class (inexternal.py
) and moving theoptional_package
function (inmisc.py
) toexternal.py
. My reasoning is that, we probably want to have networkx and joblib as our main dependencies and we would probably be just using other packages for joblib's backends, so it seems logical to have theoptional_package
function with theBackend
class. Let me know if you see any potential drawbacks to this approach. -
Exclusion of
NxReduce
inpartition.py
:
I propose excluding theNxReduce
class frompartition.py
. Since most of its functions are one-liners, it might be more intuitive for new contributors to write these directly instead of using theNxReduce
class. Additionally, this adjustment could enhance code readability, especially for those new to the library. I couldn't identify any scenarios where we'd preferNxReduce
over a simplereduce(lambda ...)
. Please share your insights on this. -
Refactoring the
NxMap
class :
For theNxMap
class, I think we would have sufficient instances where it would be useful. But, maybe it would be better to have 2 independent functions(excluding__call__
, bcoz one-line function) instead of oneNxMap
class, like if we want to have theget_chunks
parameter(in PR ENH : Addedget_chunks
tobetweenness_centrality
andcreate_iterables
inutils
#29) that lets the user define their ownnode_chunks
then we would not be requiringchunks
, but we might requirecreate_iterables
function independently(depending on the algo). Please let me know your thoughts on this.
Thank you :)
Activity