bodhi/buildsys.py | 8 +++--- bodhi/controllers.py | 24 ++++++++++-------- bodhi/model.py | 7 +++++ bodhi/static/css/layout.css | 37 ++++++++++++++++++++++++++++ bodhi/templates/master.html | 2 - bodhi/tests/test_controllers.py | 47 ++++++++++++++++++++++++++++++------ bodhi/tests/test_model.py | 4 ++- bodhi/tools/metrics.py | 52 ++++++++++++++++++++++++++++++---------- 8 files changed, 146 insertions(+), 35 deletions(-)
New commits: commit 85d29f9b3fc98472306a1de94e7cbdd155d94277 Author: Luke Macken lmacken@redhat.com Date: Fri Sep 10 13:33:54 2010 -0400
Add a new test_duplicate_packages_for_different_releases unit test.
Ensure that bodhi allows submitting an update with two versions of the same package to different releases.
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py index ff8c365..98a4bac 100644 --- a/bodhi/tests/test_controllers.py +++ b/bodhi/tests/test_controllers.py @@ -2245,6 +2245,39 @@ class TestControllers(testutil.DBTest): except SQLObjectNotFound, e: pass
+ def test_duplicate_packages_for_different_releases(self): + """ + Ensure that bodhi allows submitting an update with two versions of the + same package to different releases. + """ + session = login() + create_release() + create_release('8', dist='dist-f') + params = { + 'builds' : 'TurboGears-1.0.8-1.fc7,TurboGears-1.0.8-2.fc8', + 'type_' : 'bugfix', + 'bugs' : '', + 'notes' : 'foobar', + 'request' : 'Stable', + 'suggest_reboot' : True, + 'autokarma' : True, + 'stable_karma' : 5, + 'unstable_karma' : -5 + } + testutil.capture_log(['bodhi.controller', 'bodhi.util']) + self.save_update(params, session) + log = testutil.get_log() + try: + up = PackageUpdate.byTitle(params['builds']) + assert False, "Update created with 2 builds for 2 different releases!" + except SQLObjectNotFound: + pass + one, two = params['builds'].split(',') + up1 = PackageUpdate.byTitle(one) + assert up1.title == one + up2 = PackageUpdate.byTitle(two) + assert up2.title == two + def test_week_in_testing(self): from bodhi.jobs import approve_testing_updates session = login()
commit 4619fe1081927fe6fbd4eedc5bbf80b821db08c2 Author: Luke Macken lmacken@redhat.com Date: Fri Sep 10 01:03:16 2010 -0400
Get another unit test working again
diff --git a/bodhi/buildsys.py b/bodhi/buildsys.py index fc4a2e8..29613bd 100644 --- a/bodhi/buildsys.py +++ b/bodhi/buildsys.py @@ -111,6 +111,8 @@ class DevBuildsys(Buildsystem): 'task_id': 127621, 'version': '2.6.31'} else: + f = build.split('.')[-1].replace('fc', 'f') + release = build.split('.')[-1] return {'build_id': 16058, 'completion_time': '2007-08-24 23:26:10.890319', 'creation_event_id': 151517, @@ -118,15 +120,15 @@ class DevBuildsys(Buildsystem): 'epoch': None, 'id': 16058, 'name': 'TurboGears', - 'nvr': 'TurboGears-1.0.2.2-2.fc8', + 'nvr': 'TurboGears-1.0.2.2-2.%s' % release, 'owner_id': 388, 'owner_name': 'lmacken', 'package_id': 8, 'package_name': 'TurboGears', - 'release': '2.fc8', + 'release': '2.%s' % release, 'state': 1, 'tag_id': 19, - 'tag_name': 'dist-f8-updates-testing', + 'tag_name': 'dist-%s-updates-testing' % f, 'task_id': 127621, 'version': '1.0.2.2'}
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py index c0daa36..ff8c365 100644 --- a/bodhi/tests/test_controllers.py +++ b/bodhi/tests/test_controllers.py @@ -1218,7 +1218,7 @@ class TestControllers(testutil.DBTest): create_release(num='9', dist='dist-f') create_release(num='8', dist='dist-f') params = { - 'builds' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-3.fc9,kdeutils-4.1.0-1.fc9.1,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-1.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9.1,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9.1,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-2.fc9', + 'builds' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-3.fc9,kdeutils-4.1.0-1.fc9,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-1.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-2.fc9', 'type_' : 'enhancement', 'bugs' : u'457526 456820 454930 454458 456827 456797 456850 440226 455623 440031 453321 457479 457739', 'notes' : u'This is an update to kde-4.1.0. \r\n\r\nSee also:\r\nhttp://www.kde.org/announcements/4.1/%5Cr%5Cn%5Cr%5CnNOTE: This update does not include kdepim-4.1.0', @@ -1230,12 +1230,12 @@ class TestControllers(testutil.DBTest): assert PackageBuild.select().count() == len(params['builds'].split(',')) update.status = 'testing' params = { - 'builds' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-4.fc9,kdeutils-4.1.0-1.fc9.1,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-3.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9.1,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9.1,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-4.fc9', + 'builds' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-4.fc9,kdeutils-4.1.0-1.fc9,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-3.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-4.fc9', 'release' : 'Fedora 7', 'type_' : 'enhancement', 'bugs' : '', 'notes' : '', - 'edited' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-3.fc9,kdeutils-4.1.0-1.fc9.1,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-1.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9.1,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9.1,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-2.fc9', + 'edited' : u'kdelibs-4.1.0-5.fc9,kdegames-4.1.0-2.fc9,konq-plugins-4.1.0-2.fc9,qt-4.4.1-2.fc9,quarticurve-kwin-theme-0.0-0.5.beta4.fc9,kdepimlibs-4.1.0-2.fc9,kdebase-workspace-4.1.0-8.fc9,akonadi-1.0.0-2.fc9,kde-l10n-4.1.0-2.fc9,kdegraphics-4.1.0-3.fc9,kdeutils-4.1.0-1.fc9,kdebindings-4.1.0-5.fc9,kde-i18n-3.5.9-8.fc9,kdeartwork-4.1.0-1.fc9,kdemultimedia-4.1.0-1.fc9,kdetoys-4.1.0-1.fc9,kdebase-runtime-4.1.0-1.fc9,kdeadmin-4.1.0-2.fc9,kdenetwork-4.1.0-2.fc9,kdeaccessibility-4.1.0-1.fc9,kdeplasma-addons-4.1.0-1.fc9,kdeedu-4.1.0-1.fc9,kdebase-4.1.0-1.fc9,kdesdk-4.1.0-1.fc9,kde-filesystem-4-17.fc9,qscintilla-2.2-3.fc9,qgtkstyle-0.0-0.2.20080719svn693.fc9,compiz-0.7.6-3.fc9,soprano-2.1-1.fc9,PyQt4-4.4.2-2.fc9,sip-4.7.6-1.fc9,automoc-1.0-0.8.rc1.fc9,phonon-4.2.0-2.fc9', } testutil.capture_log(['bodhi.controllers', 'bodhi.util', 'bodhi.model']) self.save_update(params, session) @@ -2238,7 +2238,7 @@ class TestControllers(testutil.DBTest): testutil.capture_log(['bodhi.controller', 'bodhi.util']) self.save_update(params, session) log = testutil.get_log() - assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.8-1.fc7 and TurboGears-1.0.8-2.fc7. Please remove one and try again.' in log, log + assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.8-1.fc7 and TurboGears-1.0.8-2.fc7. Please remove one and try again.' in log, log try: up = PackageUpdate.byTitle(params['builds']) assert False, "Update with duplicate packages was saved!"
commit d431b7c3d979d41b087f4b018b5df5882a6ebccc Author: Luke Macken lmacken@redhat.com Date: Fri Sep 10 00:20:04 2010 -0400
Get 2 unit tests working again.
The old_testing nagmail is now based on the PackageUpdate.time_in_testing, so this test needed some tweaking.
diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py index 1a365ba..c0daa36 100644 --- a/bodhi/tests/test_controllers.py +++ b/bodhi/tests/test_controllers.py @@ -390,7 +390,7 @@ class TestControllers(testutil.DBTest): up = PackageUpdate.select()[0] assert len(up.builds) == 2, up.builds assert up.title == params['edited'] - assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.2.2-2.fc7 and TurboGears-1.0.2.2-1.fc7. Please remove one and try again.' in logs + assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.2.2-2.fc7 and TurboGears-1.0.2.2-1.fc7. Please remove one and try again.' in logs
def test_add_newer_build_to_update(self): """ Try adding a newer build an update (#385) """ @@ -422,7 +422,7 @@ class TestControllers(testutil.DBTest): up = PackageUpdate.select()[0] assert len(up.builds) == 2, up.builds assert up.title == params['edited'] - assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.2.2-2.fc7 and TurboGears-1.0.2.2-3.fc7. Please remove one and try again.' in logs + assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.2.2-2.fc7 and TurboGears-1.0.2.2-3.fc7. Please remove one and try again.' in logs
def test_add_different_release_to_update(self): """ diff --git a/bodhi/tests/test_model.py b/bodhi/tests/test_model.py index 6e60bcb..d4c36b2 100644 --- a/bodhi/tests/test_model.py +++ b/bodhi/tests/test_model.py @@ -462,14 +462,16 @@ class TestPackageUpdate(testutil.DBTest): def test_old_testing_nagmail(self): update = self.get_update() update.status = 'testing' + update.status_comment() assert not update.nagged nagmail() assert not update.nagged + update.comments[-1].timestamp = datetime.utcnow() - timedelta(days=20) update.date_pushed = datetime.utcnow() - timedelta(days=20) testutil.capture_log('bodhi.jobs') nagmail() log = testutil.get_log() - assert "[old_testing] Nagging foo@bar.com about TurboGears-1.0.2.2-2.fc7" in log + assert "[old_testing] Nagging foo@bar.com about TurboGears-1.0.2.2-2.fc7" in log, log assert update.nagged, update.nagged assert update.nagged.has_key('old_testing')
commit 3157e238c8c78b2634cbfa6d4c2a8298e7a7d9b3 Author: Luke Macken lmacken@redhat.com Date: Thu Sep 9 14:02:08 2010 -0400
Prevent conflicting builds from being added to the same update (#385)
This ensures that an update cannot be pushed if it contains two different versions of the same package for the same release in the same update.
diff --git a/bodhi/controllers.py b/bodhi/controllers.py index 5de5173..699a7ca 100644 --- a/bodhi/controllers.py +++ b/bodhi/controllers.py @@ -579,6 +579,20 @@ class Root(controllers.RootController): flash_log("Stable karma must be higher than unstable karma.") raise InvalidUpdateException(params)
+ # Check for conflicting builds + for build in builds: + build_nvr = get_nvr(build) + for other_build in builds: + other_build_nvr = get_nvr(other_build) + if build == other_build: + continue + if (build_nvr[0] == other_build_nvr[0] and + build_nvr[2].split('.')[-1] == other_build_nvr[2].split('.')[-1]): + flash_log("Unable to save update with conflicting builds of " + "the same package: %s and %s. Please remove one " + "and try again." % (build, other_build)) + raise InvalidUpdateException(params) + # Make sure this update doesn't already exist if not edited: for build in builds: @@ -660,16 +674,6 @@ class Root(controllers.RootController): config.get('release_team_address')) raise InvalidUpdateException(params)
- # Check for conflicting builds when editing - for build in builds: - for other_build in builds: - if get_nvr(build)[0] == get_nvr(other_build)[0]: - if build != other_build: - flash_log("Unable to save update with conflicting builds of " - "the same package: %s and %s. Please remove one " - "and try again." % (build, other_build)) - raise InvalidUpdateException(params) - # Make sure the tag has not been moved, which indicates that we # are in the middle of pushing this update if edited.get_implied_build_tag() not in buildinfo[builds[0]]['tags']: diff --git a/bodhi/tests/test_controllers.py b/bodhi/tests/test_controllers.py index eb50604..1a365ba 100644 --- a/bodhi/tests/test_controllers.py +++ b/bodhi/tests/test_controllers.py @@ -2216,7 +2216,7 @@ class TestControllers(testutil.DBTest): update = PackageUpdate.byTitle(params['builds']) assert update.request == 'stable', update.request
- def test_duplicate_packages(self): + def test_duplicate_packages_for_same_release(self): """ Ensure that bodhi disallows submitting an update with two versions of the same package (#264). @@ -2238,7 +2238,7 @@ class TestControllers(testutil.DBTest): testutil.capture_log(['bodhi.controller', 'bodhi.util']) self.save_update(params, session) log = testutil.get_log() - assert "You cannot submit an update containing multiple versions of TurboGears" in log, log + assert u'Unable to save update with conflicting builds of the same package: TurboGears-1.0.8-1.fc7 and TurboGears-1.0.8-2.fc7. Please remove one and try again.' in log, log try: up = PackageUpdate.byTitle(params['builds']) assert False, "Update with duplicate packages was saved!"
commit 2982897063529060a9384e6dafa8a2b2ad9e292b Author: Luke Macken lmacken@redhat.com Date: Wed Sep 8 15:50:57 2010 -0400
Update our metrics.py script to calculate more metrics
diff --git a/bodhi/tools/metrics.py b/bodhi/tools/metrics.py index 57fe2a2..871fbe3 100755 --- a/bodhi/tools/metrics.py +++ b/bodhi/tools/metrics.py @@ -23,6 +23,7 @@ def main(): feedback = 0 # total number of updates that received feedback karma = {} # {username: # of karma submissions} num_updates = PackageUpdate.select().count() + proventesters = set()
for release in Release.select(): print header(release.long_name) @@ -34,18 +35,24 @@ def main(): 'num_feedback': 0, 'num_anon_feedback': 0, 'num_critpath': 0, + 'num_critpath_approved': 0, + 'num_critpath_unapproved': 0, 'critpath_without_karma': set(), + 'stable_with_negative_karma': PackageUpdate.select( + AND(PackageUpdate.q.releaseID==release.id, + PackageUpdate.q.status=='stable', + PackageUpdate.q.karma < 0)).count(), 'bugs': set(), 'karma': {}, 'deltas': [], 'occurrences': {}, 'accumulative': timedelta(), 'packages': defaultdict(int), + 'proventesters': set(), # for tracking number of types of karma '1': 0, '0': 0, '-1': 0, - None: 0, } data = stats[release.name]
@@ -70,7 +77,12 @@ def main():
for comment in update.comments:
- data[str(comment.karma)] += 1 # Track the # of +1's, -1's, and +0's. + # Track the # of +1's, -1's, and +0's. + if comment.author_name != 'bodhi': + data[str(comment.karma)] += 1 + + if comment.author_group == 'proventesters': + data['proventesters'].add(comment.author_name)
# For figuring out if an update has received feedback or not if not feedback_done: @@ -95,6 +107,7 @@ def main(): karma[author] = 0 data['karma'][author] += 1 karma[author] += 1 + if (not testingtime_done and comment.text == 'This update has been pushed to testing'): for othercomment in update.comments: @@ -109,6 +122,11 @@ def main(): break
if update.critpath: + if update.critpath_approved or update.status == 'stable': + data['num_critpath_approved'] += 1 + else: + if status in ('testing', 'pending'): + data['num_critpath_unapproved'] += 1 data['num_critpath'] += 1 if not feedback_done: data['critpath_without_karma'].add(update) @@ -127,29 +145,36 @@ def main(): float(data['num_%s' % type]) / data['num_updates'] * 100) print " * %d critical path updates (%0.2f%%)" % (data['num_critpath'], float(data['num_critpath']) / data['num_updates'] * 100) + print " * %d approved critical path updates" % ( + data['num_critpath_approved']) + print " * %d unapproved critical path updates" % ( + data['num_critpath_unapproved']) print " * %d updates received feedback (%0.2f%%)" % ( data['num_feedback'], (float(data['num_feedback']) / data['num_updates'] * 100)) print " * %d +0 comments" % data['0'] print " * %d +1 comments" % data['1'] print " * %d -1 comments" % data['-1'] - print " * %d None comments" % data[None] print " * %d unique authenticated karma submitters" % ( len(data['karma'])) + print " * %d proventesters" % len(data['proventesters']) print " * %d anonymous users gave feedback (%0.2f%%)" % ( data['num_anon_feedback'], float(data['num_anon_feedback']) / (data['num_anon_feedback'] + sum(data['karma'].values())) * 100) - print " * %d out of %d updates went through testing (%0.2f%%)" % ( - data['num_tested'], data['num_updates'], - float(data['num_tested']) / data['num_updates'] * 100) - print " * %d testing updates were pushed *without* karma (%0.2f%%)" %( + print " * %d out of %d stable updates went through testing (%0.2f%%)" %( + data['num_tested'], data['num_stable'], + float(data['num_tested']) / data['num_stable'] * 100) + print " * %d went from testing to stable *without* karma (%0.2f%%)" %( data['num_tested_without_karma'], float(data['num_tested_without_karma']) / data['num_tested'] * 100) + print " * %d updates were pushed to stable with negative karma (%0.2f%%)" % ( + data['stable_with_negative_karma'], float(data['stable_with_negative_karma']) / data['num_stable'] * 100) + # TODO: pushed with negative karma print " * %d critical path updates pushed *without* karma" % ( len(data['critpath_without_karma'])) - for update in data['critpath_without_karma']: - print " * %s submitted by %s" % (update.title, update.submitter) + #for update in data['critpath_without_karma']: + # print " * %s submitted by %s" % (update.title, update.submitter) print " * Time spent in testing:" print " * mean = %d days" % (data['accumulative'].days / len(data['deltas'])) @@ -158,17 +183,18 @@ def main(): print " * mode = %d days" % ( sorted(data['occurrences'].items(), key=itemgetter(1))[-1][0]) print " * %d packages updated" % (len(data['packages'])) - for package in sorted(data['packages'].items(), key=itemgetter(1), reverse=True): - print " * %s: %d" % (package[0].name, package[1]) + #for package in sorted(data['packages'].items(), key=itemgetter(1), reverse=True): + # print " * %s: %d" % (package[0].name, package[1]) print
print print "Out of %d total updates, %d received feedback (%0.2f%%)" % ( num_updates, feedback, (float(feedback) / num_updates * 100)) - print "Out of %d total unique karma submitters, the top 30 are:" % ( + print "Out of %d total unique karma submitters, the top 50 are:" % ( len(karma)) - for submitter in sorted(karma.iteritems(), key=itemgetter(1), reverse=True)[:30]: + for submitter in sorted(karma.iteritems(), key=itemgetter(1), reverse=True)[:50]: print " * %s (%d)" % (submitter[0], submitter[1])
+ if __name__ == '__main__': main()
commit 74749ac20792205ca90e1e4ada04f904aaf8f26c Author: Luke Macken lmacken@redhat.com Date: Wed Sep 8 15:49:45 2010 -0400
Some initial tweaks to the CSS of the python-fedora login form
diff --git a/bodhi/static/css/layout.css b/bodhi/static/css/layout.css index f546154..fdb1e94 100644 --- a/bodhi/static/css/layout.css +++ b/bodhi/static/css/layout.css @@ -495,6 +495,43 @@ p.padded { padding-left: 10px; }
+/* New python-fedora login form */ + +label { + text-align: right; + vertical-align: top; + background-color: #f1f1f1; + float: left; + clear: left; + width: 100px; + font-weight: bold; + padding: 10px 10px 10px 100px; +} + +#user_name { + text-align: left; + padding-top: 5px; + padding-left: 5px; + padding: 5px; +} + +#password { + text-align: left; + padding-top: 5px; + padding-left: 5px; + padding: 5px; +} + +#login-box form{ + border-collapse: collapse; + border-bottom: 1px solid #bcbcbc; + border-top: 1px solid #bcbcbc; + width: 100%; +} + + + + /* td.title { text-align: right; diff --git a/bodhi/templates/master.html b/bodhi/templates/master.html index 6ee26c8..3a55d03 100644 --- a/bodhi/templates/master.html +++ b/bodhi/templates/master.html @@ -135,7 +135,7 @@ $(document).ready(function() { <!-- footer BEGIN --> <div id="fedora-footer"> Bodhi Version: ${version} -- Server: ${hostname}<br/> - Copyright © 2007-2008 Red Hat, Inc. and others. All Rights Reserved.<br/> + Copyright © 2007-2010 Red Hat, Inc. and others. All Rights Reserved.<br/> Licensed under the GNU Public License v2 or later.<br /> The Fedora Project is maintained and driven by the community and sponsored by Red Hat.<br/>This is a community maintained site. Red Hat is not responsible for content.<br/> [ <a href="http://fedoraproject.org/wiki/Legal">Legal</a>, <a href="http://fedoraproject.org/wiki/Legal/TrademarkGuidelines">Trademark Guidelines</a> ]
commit 0e7f2bb3bb622916ae1365780cbb08e209e355e8 Author: Luke Macken lmacken@redhat.com Date: Wed Sep 8 15:45:45 2010 -0400
Handle 'rhbz#1234' bug links in the comments
diff --git a/bodhi/model.py b/bodhi/model.py index 80f7f99..e721782 100644 --- a/bodhi/model.py +++ b/bodhi/model.py @@ -1120,6 +1120,13 @@ class Comment(SQLObject): elif len(token) == 6 and isint(token): text.append('<a href="%s">%s</a>' % ( config.get('bz_buglink') + token, token)) + elif token.startswith('rhbz#'): + num = token.split('#')[1] + if isint(num): + text.append('<a href="%s">%s</a>' % ( + config.get('bz_buglink') + num, num)) + else: + text.append(token) else: text.append(token) return XML(' '.join(text))