Merge lp:~bac/launchpad/bug-487793 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Curtis Hovey on 2010-02-19 |
| Approved revision: | not available |
| Merged at revision: | not available |
| Proposed branch: | lp:~bac/launchpad/bug-487793 |
| Merge into: | lp:launchpad |
| Diff against target: |
646 lines (+234/-51) 18 files modified
lib/canonical/launchpad/tour/bugs (+1/-1) lib/lp/answers/interfaces/questionenums.py (+2/-2) lib/lp/blueprints/browser/specificationtarget.py (+5/-4) lib/lp/blueprints/interfaces/specification.py (+2/-2) lib/lp/blueprints/stories/sprints/01-sprint-overview.txt (+1/-1) lib/lp/bugs/doc/externalbugtracker.txt (+1/-1) lib/lp/bugs/scripts/checkwatches.py (+1/-1) lib/lp/registry/browser/configure.zcml (+4/-0) lib/lp/registry/browser/distroseries.py (+29/-4) lib/lp/registry/doc/distroseries.txt (+35/-4) lib/lp/registry/interfaces/distroseries.py (+10/-3) lib/lp/registry/model/distroseries.py (+27/-9) lib/lp/registry/stories/distroseries/xx-distroseries-index.txt (+21/-0) lib/lp/registry/templates/distroseries-index.pt (+5/-4) lib/lp/registry/templates/distroseries-portlet-packaging.pt (+78/-0) lib/lp/registry/tests/test_distroseries.py (+10/-10) lib/lp/soyuz/templates/distroseries-portlet-latestuploads.pt (+0/-3) lib/lp/translations/help/imported-upload.html (+2/-2) |
| To merge this branch: | bzr merge lp:~bac/launchpad/bug-487793 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Curtis Hovey (community) | ui | 2010-02-19 | Approve on 2010-02-19 |
| Abel Deuring (community) | Approve on 2010-02-19 | ||
| Guilherme Salgado | 2010-02-19 | Pending | |
|
Review via email:
|
|||
Commit Message
Add a portlet on the distroseries index page showing the packages most recently linked to an upstream and those that need linking.
| Brad Crittenden (bac) wrote : | # |
| Abel Deuring (adeuring) wrote : | # |
Hi Brad,
a nice branch! Thanks for all the drve-by cleanups!
I have just one minor suggestion, see below.
Abel
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -315,9 +315,9 @@
> result += self.distributi
> return result
>
> - @property
> - def packagings(self):
> - """See `IDistroSeries`."""
> + @cachedproperty
> + def _all_packagings
> + """Get an unordered list of all packagings."""
> # We join to SourcePackageName, ProductSeries, and Product to cache
> # the objects that are implicitly needed to work with a
> # Packaging object.
> @@ -338,6 +338,12 @@
> ProductSeries.
> condition = [Packaging.
> results = IStore(
> + return results
Since the list 'condition' will never change in this method, I think this can be simplified to
condition = Packaging.
results = IStore(
| Brad Crittenden (bac) wrote : | # |
Abel thanks for your suggestion. Unfortunately the condition has to be a sequence. Since it is immutable I could make it a tuple instead of a list but that would look like:
condition = (Packaging.
which I personally to be more distracting than just using a list. So unless you have strong objections I'd prefer to leave the code as is.
| Abel Deuring (adeuring) wrote : | # |
On 19.02.2010 16:35, Brad Crittenden wrote:
> Abel thanks for your suggestion. Unfortunately the condition has to be a sequence. Since it is immutable I could make it a tuple instead of a list but that would look like:
>
> condition = (Packaging.
>
> which I personally to be more distracting than just using a list. So unless you have strong objections I'd prefer to leave the code as is.
Sure, having a tuple there would be more distracting. But, well, perhaps
I am a bit thick today, and out of curiosity -- what is wrong with
condition = Packaging.
results = IStore(
return results
I just tried the tests with this variant -- it passed just fine.
Abel
| Brad Crittenden (bac) wrote : | # |
Abel thanks for the follow up. It was me being dense, not you!
When I'd attempted to make the change earlier I failed to remove the * from *condition when passing the parameter.
I've made the improvement now as you suggest.
| Curtis Hovey (sinzui) wrote : | # |
Hi Brad.
Thanks for working on this. Thanks for finalising my mistmatched suggestions.
There is a link problem. I see (i) Show uploads in the new portlet. It should have remained with the Latest uploads portlet that was moved below the milestones. We expect the user to see the latest uploads, then use the (i) Show uploads link to see the uploads that are not listed.
The new portlet is showing linked and unlinked packagings, and each has its own report. We want the new portlet to link to these reports: (i) Needs upstream links (i) All upstream links. Note that each report links to its counterpart so that the user does not need to return to the portlet.
This is fine to land after to reconcile the links.
Oh wow, I just used Edwin's link source package to upstream project multi-step form. That was nice. That is much faster than the series picker. I see that users are shown when they set the package...sample data sucks.

= Summary =
A new portlet to show information about a distroseries' upstream packaging
associations is shown on the distroseries-index page.
== Proposed fix ==
Create a new portlet showing the most recently linked packages and those that most
need attention, either linking or providing additional information like bug tracker
location, etc.
== Pre-implementation notes ==
Talks with Curtis.
== Implementation details ==
As above.
== Tests ==
bin/test -vvm lp.registry -t distroseries.txt -t xx-distroseries -index. txt
== Demo and Q/A ==
https:/ /launchpad. dev/ubuntu/ warty /launchpad. dev/ubuntu/ warty /launchpad. net/ubuntu/ lucid
https:/
https:/
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ browser/ configure. zcml registry/ templates/ distroseries- portlet- packaging. pt registry/ templates/ distroseries- index.pt blueprints/ browser/ specificationta rget.py registry/ doc/distroserie s.txt registry/ interfaces/ distroseries. py registry/ stories/ distroseries/ xx-distroseries -index. txt registry/ model/distroser ies.py registry/ browser/ distroseries. py soyuz/templates /distroseries- portlet- latestuploads. pt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
BRANCH.TODO
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ interfaces/ distroseries. py fields' (No module named restful) declarations' (No module named restful) sionField. _validate] Use super on an old style class blic.getPackage Uploads] Operator not preceded by a space =_("Return items that are more recent than this " False),
23: [F0401] Unable to import 'lazr.enum' (No module named enum)
50: [F0401] Unable to import 'lazr.restful.
51: [F0401] Unable to import 'lazr.restful.
116: [E1002, DistroSeriesVer
452: [C0322, IDistroSeriesPu
description
^
"timestamp."),
required=
status=Choice(
vocabulary= DBEnumeratedTyp e, _("Package Upload Status"), =_("Return only items that have this status."), False), Reference(
title=
description
required=
archive=
schema= Interface, _("Archive" ), =_("Return only items for this archive."), False),
title=
description
required=
pocket=Choice(
vocabulary= DBEnumeratedTyp e, _("Pocket" ), =_("Return only items targeted to this pocket"), False), type=Choice(
title=
description
required=
custom_
vocabulary= DBEnumeratedTyp e, =_("Return only items with custom files of this " False),
title=_("Custom Type"),
description
"type."),
required=
)
@operation_ returns_ collection_ of(Interface) read_operation( ) ds(created_ since_date, status, archive, pocket,
@export_
def getPackageUploa
custom_type):
lib/lp/ registry/ model/distroser ies.py getMostRecently LinkedPackaging s] String statement has
478: [W0105, DistroSeries.
no effect
The last lint issue will be fixed before landing.
Also a number of drive-by typos will be fixed before landing. The diff is at: pastebin. ubuntu. com/379696/
http://
Priorized -> Prioritized (in two method names)
prioritised -> prioritzed (use en_US)
pakage -> package