[Collab-qa-commits] r933 - in udd: . src

neronus-guest at alioth.debian.org neronus-guest at alioth.debian.org
Fri Jul 25 09:56:21 UTC 2008


Author: neronus-guest
Date: 2008-07-25 09:56:20 +0000 (Fri, 25 Jul 2008)
New Revision: 933

Modified:
   udd/TODO
   udd/src/db_manager.py
   udd/src/setup-db.sql
Log:
2 fixed, 1 new


Modified: udd/TODO
===================================================================
--- udd/TODO	2008-07-24 23:02:50 UTC (rev 932)
+++ udd/TODO	2008-07-25 09:56:20 UTC (rev 933)
@@ -24,6 +24,7 @@
 - (prio: high) add a way to mark the date of the last successful update in a
   file, for each data source, so we can answer the "how up-to-date is this
   data?" question.
+- (prio: medium) Write/update documentation about the system, and how to use it.
 
 packages/sources
 ----------------
@@ -50,10 +51,6 @@
 
 popcon
 ------
-- (prio: high) rename view popcon_* so it's clear that they are for source
-  package. Maybe popcon_src_max and popcon_src_average ?
-- (prio: high) fix the views. Shouldn't they max() and avg() only results from
-  Debian's popcon, not Ubuntu's?
 - (prio: high) fix Ubuntu's popcon? (is it broken?)
   16:55 < Neronus> Great. ubuntu popcon raw data is broken.
 

Modified: udd/src/db_manager.py
===================================================================
--- udd/src/db_manager.py	2008-07-24 23:02:50 UTC (rev 932)
+++ udd/src/db_manager.py	2008-07-25 09:56:20 UTC (rev 933)
@@ -6,8 +6,9 @@
 
 """This scripts sets up and deletes the tables of the database"""
 
-TABLES = ('sources', 'packages', 'popcon', 'migrations', 'bugs', 'bug_merged_with', 'bug_user_tags')
-VIEWS = ('popcon_average', 'popcon_max')
+TABLES = ('sources', 'packages', 'popcon', 'migrations', 'bugs', 'bug_merged_with', 'bug_user_tags', 'bug_found_in',
+          'bug_fixed_in')
+VIEWS = ('popcon_src_average', 'popcon_src_max')
 
 def print_help():
   print "Usage: %s <config> <delete|setup>" % sys.argv[0]

Modified: udd/src/setup-db.sql
===================================================================
--- udd/src/setup-db.sql	2008-07-24 23:02:50 UTC (rev 932)
+++ udd/src/setup-db.sql	2008-07-25 09:56:20 UTC (rev 933)
@@ -42,22 +42,25 @@
 CREATE TABLE bug_fixed_in
   (id int, version text);
 
-CREATE VIEW popcon_average AS
+CREATE VIEW popcon_src_average AS
   SELECT sources.package, avg(vote) AS vote, avg(olde) AS old, avg(recent) AS recent, avg(nofiles) as nofiles
     FROM sources, popcon,
-          (SELECT DISTINCT packages.package, packages.source FROM packages) as packages
+          (SELECT DISTINCT packages.package, packages.source FROM packages WHERE packages.distribution = 'debian') as packages
     WHERE sources.release = 'sid' AND
           packages.source = sources.package AND
-	  popcon.name = packages.package
+	  popcon.name = packages.package AND
+	  popcon.distribution = 'debian'
     GROUP BY sources.package;
 
 
-CREATE VIEW popcon_max AS
+CREATE VIEW popcon_src_max AS
   SELECT sources.package, max(vote) AS vote, max(olde) AS old, max(recent) AS recent, max(nofiles) as nofiles
     FROM sources, popcon, packages
     WHERE sources.release = 'sid' AND
+          packages.distribution = 'debian' AND 
           packages.source = sources.package AND
-	  popcon.name = packages.package
+	  popcon.name = packages.package AND
+	  popcon.distribution = 'debian'
     GROUP BY sources.package;
 
 
@@ -69,8 +72,8 @@
 GRANT SELECT ON Packages TO PUBLIC;
 GRANT SELECT ON sources TO PUBLIC;
 GRANT SELECT ON popcon TO PUBLIC;
-GRANT SELECT ON popcon_average TO PUBLIC;
-GRANT SELECT ON popcon_max TO PUBLIC;
+GRANT SELECT ON popcon_src_average TO PUBLIC;
+GRANT SELECT ON popcon_src_max TO PUBLIC;
 GRANT SELECT ON bugs TO PUBLIC;
 GRANT SELECT ON bug_merged_with TO PUBLIC;
 GRANT SELECT ON bug_found_in TO PUBLIC;




More information about the Collab-qa-commits mailing list