igraph roadmap 2021-2023

igraph roadmap 2021–2023

This document describes the overall development roadmap for 2021–2023. The overall goal is to arrive at code that is cleaner, easier to use, and easier to maintain. For the period 2021–2023 there is funding available from CZI, allowing us to invest time into making this happen, so that maintenance will be a lighter load after 2023.

Stable API for the C core

The objective during 2022 is to arrive at a definitive stable core C API. There are a few elements that we still need to consider for arriving at a stable core C API. This includes:

  • Graph data type

  • Caching properties of graphs, e.g. is_simple, is_connected, etc.

  • Efficient iterators, not only for edges or vertices, but also for example for cliques, subgraphs, motifs, etc.

  • A thorough review of the existing C API to identify pain points, inconsistencies and places where the API could be improved.

Additionally, we plan to improve the documentation system and modernize the website. For each programming language, online documentation will be available for the current development version as well as for past releases. This is now already in place, and will be further improved.

Decoupling the code generator from the R interface

Another major item is decoupling the code generation tool Stimulus from the current igraph C library. This will enable the development and maintenance of Stimulus independent of the igraph C library. Stimulus is used only to generate the R interface at the moment, and the decoupling needs to ensure that the R interface continues to work properly with it.

Updating the R interface for the latest stable version of the C core

The R interface will first be updated to bring all underlying improvements of the C library (release 0.8.x) to the R interface, which will result in a new release of the R interface. Once this is achieved, we will update the R interface to work with the independent Stimulus tools and update it to the more recent 0.9.x release, which is based on a CMake build system.

Using the code generator for other higher-level interfaces (Python, C++)

We will explore several code generation tools for the Python interface. This includes Simulus, but we will also explore other options, such as pybind11 and SWIG. At the same time, we will explore whether Stimulus could help to generate code for the Mathematica interface. This would rely on a thin auto-generated C++ interface. The C++ interface would also make low-level igraph programming more accessible by simplifying memory management, error handling and reducing the amount of boilerplate code. Around mid-2022 we expect to reach a decision on how to best use Stimulus and possibly other code generation tools, especially with an eye on modernizing the Python interface.

Redesigned Python interface and better integration with Jupyter notebooks

Overall redesign

The Python interface is planned to be completely redesigned. We will first redraft the overall package structure and overall API. The overall idea is to separate the Python interface more from the C core so that the Python interface is better adapted and integrated in the Python ecosystem. This should also allow us to automatically generate most of the Python glue code from the C core, while part of the Python interface will have to be programmed manually in Python. Once the Python interface is redesigned, new contributions that are made to the C core could then more easily propagate towards the Python interface. We intend to arrive at this new design, including a prototype Python interface near the end of 2022.

Type annotations

A nice side-effect of using more generated code for the Python interface would be the possibility to add type annotations where possible.

Interoperability with NumPy

Additionally, we plan to investigate interoperability with existing numerical Python packages, in particular numpy. Many results of igraph are currently converted to pure Python objects, which makes this much less efficient. If we make use of numpy, this can be made much more efficient. Additionally, it makes it much easier to continue working with numpy arrays instead of Python lists.

Integration with Jupyter notebooks

Once the Python prototype is available we will pay special attention towards Jupyter Notebooks and interactive use of python-igraph. We will explore some of the possibilities to make visualizations more accessible, including adjusting for overlapping nodes or labels and automatically selecting labels for display. These changes may in turn trigger some adjustments to the C core.

We will finalize the Python interface in early 2023 and make a new beta release. This will be accompanied by proper documentation and tutorials for the new version of the Python interface.

Finally, in mid 2023, we intend to make a final 1.0 release of the Python interface.

2 Likes