Merge lp:~adiroiban/launchpad/bug-527728 into lp:launchpad
Proposed by
Adi Roiban
on 2010-03-02
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Brad Crittenden on 2010-03-02 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | not available | ||||
| Proposed branch: | lp:~adiroiban/launchpad/bug-527728 | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
100 lines (+28/-5) 3 files modified
lib/lp/registry/interfaces/sourcepackage.py (+5/-0) lib/lp/registry/model/sourcepackage.py (+9/-1) lib/lp/registry/stories/webservice/xx-source-package.txt (+14/-4) |
||||
| To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-527728 | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2010-03-02 | Approve on 2010-03-02 |
|
Review via email:
|
|||
Commit Message
Export latest_
To post a comment you must log in.
| Adi Roiban (adiroiban) wrote : | # |
| Brad Crittenden (bac) wrote : | # |
Hi Adi,
Thanks for this work. Once the newest version was pushed up everything worked fine.
As I mentioned on IRC it's always a good idea to exercise API changes via launchpadlib. Here's how I verified your new property:
1: lp = launchpad
2: u = lp.distribution
3: hoary = u.getSeries(
4: ev = hoary.getSource
5: dir(ev)
6: ev.latest_
review:
Approve
(code)
| Brad Crittenden (bac) wrote : | # |
Adi I will be glad to land your branch when PQM re-opens after the roll out. Please remind me if I forget.

= Bug 527728 =
It looks like the source_package is already exported in API (https:/ /api.launchpad. net/+apidoc/ #source_ package).
To help with translation reporting tasks (https:/ /dev.launchpad. net/Translation s/Specs/ ReportingAPI) it would be nice to also have the component name for a source package.
== Proposed fix ==
Add compoment_name in the list of exported attributes for ISourcePackage
== Pre-implementation notes == published_ component_ name, since this is the flattening export for latest_ published_ component
Sinzui suggest exporting the compoment_name as latest_
== Implementation details ==
I don't know how to get rid of those lazr.restful lint warning.
Any suggestion is much appreciated.
== Tests ==
lp-test -t source-package.txt
== Demo and Q/A == /launchpad. dev/api/ beta/ubuntu/ hoary/+ source/ evolution
The Ubuntu Hoary source package is exported via API at:
https:/
The list of attributes should include the „component_name” and it should match the component name displayed at https:/ /launchpad. dev/ubuntu/ lucid/+ source/ evolution
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ interfaces/ sourcepackage. py registry/ model/sourcepac kage.py registry/ stories/ webservice/ xx-source- package. txt
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ interfaces/ sourcepackage. py fields' (No module named restful) declarations' (No module named restful) getBranch] Operator not preceded by a space DBEnumeratedTyp e))
21: [F0401] Unable to import 'lazr.enum' (No module named enum)
27: [F0401] Unable to import 'lazr.restful.
28: [F0401] Unable to import 'lazr.restful.
188: [C0322, ISourcePackage.
vocabulary=
^
@operation_ returns_ entry(Interface ) read_operation( ) setBranch] Operator not preceded by a space DBEnumeratedTyp e), Reference( Interface, title=_("Branch"), required=False)) with(registrant =REQUEST_ USER) write_operation ()
@export_
def getBranch(pocket):
206: [C0322, ISourcePackage.
vocabulary=
^
branch=
@call_
@export_
def setBranch(pocket, branch, registrant):