Hi,I wrote two scripts to help me visualize package dependencies in sage better, and thought it would be nice to share them.
Here is a sample use :jpuydt@newton:~$ ./deps_cleaner.sh ~/sage-5.0.beta1/spkg/standard/deps | ./deps_to_dot.py > sage.dot
jpuydt@newton:~$ dot -Tpng sage.dot -osage.png jpuydt@newton:~$ xdg-open sage.png (The dot tool is the graphviz one.)I know the resulting directed graph can't be a tree because it's logical some leaves can be on several branches -- but I'm quite surprised by how many roots it has!
Snark on #sagemathPS: Of course, it's still possible those script are buggy to the core and the graphs unreliable sources of information.
-- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
deps_cleaner.sh
Description: Bourne shell script
#!/usr/bin/python
import sys
print ('digraph G {')
for line in sys.stdin.readlines ():
head, tail = line.split (':')
for dep in tail.split (' '):
if dep.strip() != '':
print (' {} -> {};'.format(head, dep.strip ()))
print ('}')
