All published worksheets from http://sagenb.org
Image: ubuntu2004
Appropriately enough, the relevant "Makefile" in this case lives under spkg directory:
Now we generate a dictionary whose keys are spkgs. The corresponding value for each key is a list of prerequisite spkgs, distilled from the Makefile. (Note: It may be better to use regular expressions instead.) We also prepare a short list of basic dependencies which we can later exclude from the graph.
With the spkg dictionary we construct a directed graph, which is a graph whose edges can be "arrows." For convenience, we reverse all of the directed edges and delete some vertices. For more on graphs in Sage, please see the reference manual. Finally, we try to view the graph, er, graphically:
That is quite messy, but with some insight from Robert Miller, we can get a neater layout. First, we verify that our graph is indeed a directed acyclic graph (DAG):
This means that none of our spkgs is a prerequisite for itself, either directly or indirectly, which is reassuring news. With this information we can construct a partially ordered set, or poset, from our graph and plot it instead:
We can get an another representation if the Graphviz package is installed locally:
It's not, apparently, but here's an uploaded image:
This is just a start. Happy graphing!