Merge lp:~jml/launchpad/visible-dependencies into lp:launchpad

Proposed by Jonathan Lange
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jml/launchpad/visible-dependencies
Merge into: lp:launchpad
Diff against target: 97 lines (+67/-0)
3 files modified
.bzrignore (+4/-0)
Makefile (+28/-0)
lp-sfood-packages (+35/-0)
To merge this branch: bzr merge lp:~jml/launchpad/visible-dependencies
Reviewer Review Type Date Requested Status
Eleanor Berger (community) code Approve
Review via email: mp+21807@code.launchpad.net

Commit message

Add 'make lp-clustered.svg' target to generate import dependency information.

Description of the change

This branch adds a bunch of make targets to produce package dependency graphs. It means that we'll need a new dependency in launchpad-developer-dependencies.

To test:
  $ sudo apt-get install snakefood
  $ make lp-clustered.svg

And then view lp-clustered.svg or lp-clustered.dot in your favourite viewer. Mine is dotviewer from pypy.

Run 'make clean' to watch the created files disappear.

The file lp-sfood-packages contains a list of the packages that I consider meaningful enough to appear on the dependency chart. It has to be reverse alphabetical order to give valid results.

To post a comment you must log in.
Revision history for this message
Eleanor Berger (intellectronica) wrote :

I aired a concern about having to update the list of packages manually, but since we both couldn't think of a better solution we agreed that this better land, and that it's worth thinking whether a better, dynamic solution is possible.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2010-03-11 20:53:58 +0000
3+++ .bzrignore 2010-03-22 15:44:31 +0000
4@@ -62,3 +62,7 @@
5 ./pipes
6 lib/canonical/launchpad/apidoc/wadl-development-*.xml
7 tags.new
8+lp-clustered.dot
9+lp-clustered.sfood
10+lp-clustered.svg
11+lp.sfood
12
13=== modified file 'Makefile'
14--- Makefile 2010-03-18 22:27:20 +0000
15+++ Makefile 2010-03-22 15:44:31 +0000
16@@ -347,6 +347,7 @@
17 # /var/tmp/launchpad_mailqueue is created read-only on ec2test
18 # instances.
19 if [ -w /var/tmp/launchpad_mailqueue ]; then $(RM) -rf /var/tmp/launchpad_mailqueue; fi
20+ $(RM) -f lp.sfood lp-clustered.sfood lp-clustered.dot lp-clustered.svg
21
22
23 realclean: clean
24@@ -406,6 +407,33 @@
25 # idutils ID file
26 bin/tags -i
27
28+lp.sfood:
29+ # Generate import dependency graph
30+ sfood -i -u -I lib/sqlobject -I lib/schoolbell -I lib/devscripts -I lib/contrib \
31+ -I lib/canonical/not-used lib/canonical lib/lp 2>/dev/null | grep -v contrib/ \
32+ | grep -v sqlobject | grep -v BeautifulSoup | grep -v psycopg \
33+ | grep -v schoolbell > lp.sfood.tmp
34+ mv lp.sfood.tmp lp.sfood
35+
36+
37+lp-clustered.sfood: lp.sfood lp-sfood-packages
38+ # Cluster the import dependency graph
39+ sfood-cluster -f lp-sfood-packages < lp.sfood > lp-clustered.sfood.tmp
40+ mv lp-clustered.sfood.tmp lp-clustered.sfood
41+
42+
43+lp-clustered.dot: lp-clustered.sfood
44+ # Build the visual graph
45+ sfood-graph -p < lp-clustered.sfood > lp-clustered.dot.tmp
46+ mv lp-clustered.dot.tmp lp-clustered.dot
47+
48+
49+lp-clustered.svg: lp-clustered.dot
50+ # Render to svg
51+ dot -Tsvg < lp-clustered.dot > lp-clustered.svg.tmp
52+ mv lp-clustered.svg.tmp lp-clustered.svg
53+
54+
55 .PHONY: apidoc check tags TAGS zcmldocs realclean clean debug stop\
56 start run ftest_build ftest_inplace test_build test_inplace pagetests\
57 check check_merge \
58
59=== added file 'lp-sfood-packages'
60--- lp-sfood-packages 1970-01-01 00:00:00 +0000
61+++ lp-sfood-packages 2010-03-22 15:44:31 +0000
62@@ -0,0 +1,35 @@
63+lp/translations
64+lp/testopenid
65+lp/testing
66+lp/soyuz
67+lp/services
68+lp/scripts
69+lp/registry
70+lp/poppy
71+lp/hardwaredb
72+lp/coop/answersbugs
73+lp/codehosting
74+lp/code
75+lp/buildmaster
76+lp/bugs
77+lp/blueprints
78+lp/archiveuploader
79+lp/archivepublisher
80+lp/app
81+lp/answers
82+canonical/zeca
83+canonical/widgets
84+canonical/tests
85+canonical/testing
86+canonical/poppy
87+canonical/not-used
88+canonical/lp
89+canonical/librarian
90+canonical/lazr
91+canonical/launchpad
92+canonical/ftests
93+canonical/doap
94+canonical/database/testing
95+canonical/database
96+canonical/config
97+canonical/buildd