Contribute to networkx community

84 views
Skip to first unread message

carlos raso alonso

unread,
Mar 31, 2025, 6:37:24 PMMar 31
to networkx-discuss
Hello, I am developing some functionalities using networkx, such as finding triconnected components of a graph and I would be willing to incorporate them to networkx library. How can I do this?

Rhyd Lewis

unread,
Apr 1, 2025, 2:57:34 AMApr 1
to networkx-discuss
Hi Carlos,

It's not really an answer to your question, but I think this would be a valuable addition to the library. I was recently looking for some reliable code to do just this (SPQR trees, etc.) and the only resource I could find was in SageMath. Mathematica also has similar functionality, but it's obviously not open source. There was nothing else available as far as I could tell.

Good luck in making the contribution

Rhyd

peter.st...@gmail.com

unread,
Apr 1, 2025, 3:39:28 AMApr 1
to networkx...@googlegroups.com

Dear Rhyd,

 

I am not familiar with the procedures at networkx, but if it were, say, sympy, you would include your code

where appropriate and make a PR (pull request).

 

Hopefully somewone will look at it.

 

Peter

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/networkx-discuss/f5910fa9-f6d6-44af-a1a6-89d0f522d4d1n%40googlegroups.com.

Dan Schult

unread,
Apr 1, 2025, 8:43:11 AMApr 1
to networkx...@googlegroups.com
The answer your question depends on how familiar you are with tools like git, github, pytest, etc. But there is more information in our docs under the Developer tab, or if you prefer, in the GitHub repo under CONTRIBUTING.rst.  

I would guess you want to put the code as a function(s) in a module that handles connected components, but it is possible you want to create a new module if the code is complex or involves many functions. Be sure to add tests of specific traits, like optional keywords and raising exceptions on inputs. And tests of simple cases that show what the function is supposed to do. These help make sure that future code changes don’t break the algorithm.  

You can also open an issue or a partial PR with questions or to give us an idea of what you are working on and get feedback along the way.

Thanks for contributing!
Dan

carlos raso alonso

unread,
Apr 17, 2025, 5:56:59 PMApr 17
to networkx-discuss
Thank you for your response. I will take a look to that information. When I think I have the working code I should just open a PR? Who needs to approve it in order to incorporate the functionality to the library? I am not very familiarized with open source code development.

Dan Schult

unread,
Apr 18, 2025, 1:12:07 PMApr 18
to networkx...@googlegroups.com
Yes -- when you have a working PR, you should submit that to the NX repo. Of course, read the contributing guide and so forth. But it is also OK to post a partial PR that should what you are intending if you have questions about how that should work.  An Issue is also possible, but a PR can sometimes be easier to explain the question and to answer it. 

Typically we aim for having two core developers approve a PR before it gets merged. Reviews by other people are very helpful in this process as they improve the code and make it easier for the core devs review too. Another thing to remember about open source dev is that we are largely a group of volunteers -- so it may take some time to respond in some cases. Patience and polite reminders ("pings") on a github PR can reset dev focus sometimes.

It's probably not great to ping this group too often because it is large and we like to keep contribution discussions on github itself to avoid noise. 
:)
Best,
Dan
Reply all
Reply to author
Forward
0 new messages