== Proposed fix ==
Add compoment_name in the list of exported attributes for ISourcePackage
== Pre-implementation notes ==
Sinzui suggest exporting the compoment_name as latest_published_component_name, since this is the flattening export for latest_published_component
== Implementation details ==
I don't know how to get rid of those lazr.restful lint warning.
Any suggestion is much appreciated.
lib/lp/registry/interfaces/sourcepackage.py
21: [F0401] Unable to import 'lazr.enum' (No module named enum)
27: [F0401] Unable to import 'lazr.restful.fields' (No module named restful)
28: [F0401] Unable to import 'lazr.restful.declarations' (No module named restful)
188: [C0322, ISourcePackage.getBranch] Operator not preceded by a space
vocabulary=DBEnumeratedType))
^
@operation_returns_entry(Interface)
@export_read_operation()
def getBranch(pocket):
206: [C0322, ISourcePackage.setBranch] Operator not preceded by a space
vocabulary=DBEnumeratedType),
^
branch=Reference(Interface, title=_("Branch"), required=False))
@call_with(registrant=REQUEST_USER)
@export_write_operation()
def setBranch(pocket, branch, registrant):
= 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):