Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make igraph dependency optional #2146

Open
mlell opened this issue Nov 24, 2023 · 5 comments
Open

Make igraph dependency optional #2146

mlell opened this issue Nov 24, 2023 · 5 comments
Milestone

Comments

@mlell
Copy link

mlell commented Nov 24, 2023

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
Copy link
Author

mlell commented Nov 27, 2023

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:

@krlmlr
Copy link
Collaborator

krlmlr commented Nov 28, 2023

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 krlmlr added this to the upkeep milestone Nov 28, 2023
@mlell
Copy link
Author

mlell commented Dec 1, 2023

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)

@krlmlr
Copy link
Collaborator

krlmlr commented Dec 2, 2023

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.

@asadow
Copy link

asadow commented Feb 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants