dm icon indicating copy to clipboard operation
dm copied to clipboard

Make igraph dependency optional

Open mlell opened this issue 2 years ago • 8 comments

I would like to investigate the dm package as a recommendation for our group as an intermediate solution to multi-table handling that can be extended to a more thorough solution. However, I have to watch out for excessive dependencies as this complicates the installation process.

The igraph package, it seems to me, is only necessary to plot the relationships between the tables. This is useful, but not a core functionality. In contrast to the dependencies on the tidyverse packages, which often are already available because of their broad application range, igraph is only needed if one wants to compute on or visualize graphs. Therefore it is an additional burden (I timed 2m50s for the compilation time of igraph on Linux). But also on Windows this time must often be spent, e.g. when re-creating previously-used sets of packages for reproducibility (e.g. using renv). The process of installing many packages is cumbersome and error-prone especially for newcomers and the compilation times add up over many packages.

Therefore, as dm also has a potentially broad applicability like dplyr, I would be happy if you could relax the dependency on igraph to "Suggested".

mlell avatar Nov 24 '23 11:11 mlell

To back this point up with a bit of data, please find here the installation times extracted from the CRAN logs using the itdepends package:

mlell avatar Nov 27 '23 09:11 mlell

Thanks, good point regarding the compilation time. Happy to review a PR that uses check_suggested() in the appropriate places. However:

  • There's more than just plotting.
  • Are binary packages via PPM an option for you?
  • igraph compilation can be sped up by installing optional system libraries

krlmlr avatar Nov 28 '23 13:11 krlmlr

Thanks for taking a look on this. Then I will dig into the code and see if I can disentangle it. As of my current knowledge, binary packages are not compatible with reproducibility solutions like the renv package, which compiles packages of a specified version, both on Windows (where otherwise binary packages are available per default) and Linux (where one need admin rights or a container compatible with the available binary PPAs)

mlell avatar Dec 01 '23 13:12 mlell

Thanks. In addition to the arguments above: Chances are that igraph is used by other packages, it has over 100 packages that import igraph or depend on it.

krlmlr avatar Dec 02 '23 09:12 krlmlr

This would also simplify using dm in Dockerized projects that have no use for the graphs (as beautiful and handy as they are).

asadow avatar Feb 15 '24 16:02 asadow