Author Archives: Iain Dunning

Julia Package Ecosystem Dependency Graphs

Julia is a relatively young programming language that is rising in popularity. I personally use it heavily in my work, and try to contribute back where I can. It has an in-built package manager that is mostly used to access packages from the central repository, METADATA.jl, which contains a listing of packages and their dependencies. At the time of writing there were 363 packages available that are compatible with the Julia 0.3 release candidate.

I recently wrote some code to analyze METADATA, available as part of PackageEval.jl (funnily enough, this package isn't in METADATA). I have utilized that functionality to generate dependency graphs for METADATA, where a directed link between two packages A and B means that package A depends on package B. Combining this with GraphLayout.jl, which does force-based graph layout in pure Julia, and Compose.jl, a declarative vector graphics library with multiple backends, enables us to make some interesting plots. I apologize in advance for the overlapping labels and nodes – the algorithm I've implemented in GraphLayout is still pretty basic and doesn't do anything smart with labels or line avoidance.

The obvious question is to determine which packages have the highest number of dependencies which we can find by determining the sizes of the connected component of packages reachable by starting from each package. It turns out that the package with the most dependencies is Quandl.jl with 30. Interestingly, it only directly depends on five packages itself.

Quandl.jl dependency graph

Quandl.jl dependency graph

Read more at iaindunning.com