New Contributor FAQ

A collection of frequently-asked questions by newcomers to open-source development and first-time contributors to NetworkX.

Q: I’m new to open source and would like to contribute to NetworkX. How do I get started?

To contribute to NetworkX, you will need three things:

  1. The source code

  2. A development environment

  3. An idea of what you’d like to contribute

Steps 1 & 2 are covered extensively in Development Workflow. There is no generic answer for step 3. There are many ways that NetworkX can be improved, from adding new algorithms, improving existing algorithms, improving the test suite (e.g. increasing test coverage), and improving the documentation. The “best” way to find a place to start is to follow your own personal interests! That said, a few places to check for ideas on where to get started:

  • The issue tracker lists known bugs and feature requests. Of particular interest for first-time contributors are issues that have been tagged with the Good First Issue or Sprint labels.

  • The Algorithms discussion includes a listing of algorithms that users would like to have but that are not yet included in NetworkX.

Q: I want to work on a specific function. How do I find it in the source code?

Assuming you have followed the instructions for setting up the development workflow, there are several ways of determining where the in the source code a particular function or class is defined.

For example, let’s say you are interested in making a change to the kamada_kawai_layout function, so you need to know where it is defined. In an IPython terminal, you can use ? — the source file is listed in the File: field:

In [1]: import networkx as nx
In [2]: nx.kamada_kawai_layout?
Signature: <clipped for brevity>
Docstring: <clipped for brevity>
File: ~/networkx/networkx/drawing/layout.py
Type: function

Command line utilities like grep or git grep are also very useful. For example, from the NetworkX source directory:

$ grep -r "def kamada_kawai_layout" .
./networkx/drawing/layout.py:def kamada_kawai_layout(