Merge lp:~abentley/launchpad/build-from-recipe-api into lp:launchpad
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~abentley/launchpad/build-from-recipe-api |
Merge into: | lp:launchpad |
Diff against target: |
786 lines (+257/-52) 21 files modified
lib/canonical/launchpad/components/apihelpers.py (+15/-0) lib/canonical/launchpad/doc/tales.txt (+3/-3) lib/canonical/launchpad/interfaces/_schema_circular_imports.py (+13/-2) lib/lp/code/browser/tests/test_sourcepackagerecipe.py (+1/-1) lib/lp/code/interfaces/sourcepackagerecipe.py (+42/-11) lib/lp/code/interfaces/sourcepackagerecipebuild.py (+2/-0) lib/lp/code/interfaces/webservice.py (+2/-0) lib/lp/code/model/sourcepackagerecipe.py (+12/-0) lib/lp/code/tests/test_sourcepackagerecipe.py (+73/-3) lib/lp/registry/interfaces/person.py (+26/-1) lib/lp/registry/model/person.py (+14/-0) lib/lp/soyuz/browser/tests/archivesubscription-views.txt (+13/-13) lib/lp/soyuz/doc/archive.txt (+1/-1) lib/lp/soyuz/doc/archiveauthtoken.txt (+1/-1) lib/lp/soyuz/doc/sourcepackagerelease.txt (+4/-4) lib/lp/soyuz/model/archive.py (+1/-2) lib/lp/soyuz/scripts/tests/test_ppa_add_missing_builds.py (+1/-0) lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt (+1/-1) lib/lp/testing/__init__.py (+17/-1) lib/lp/testing/_webservice.py (+3/-0) lib/lp/testing/factory.py (+12/-8) |
To merge this branch: | bzr merge lp:~abentley/launchpad/build-from-recipe-api |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Penhey (community) | Approve | ||
Review via email: mp+23981@code.launchpad.net |
Commit message
Expose SourcePackageRecipe over the web service
Description of the change
= Summary =
Provide SourcePackageRecipe over the web service
== Proposed fix ==
See above
== Pre-implementation notes ==
Discussion with the entire code team, at various points.
== Implementation details ==
Added Person.
Exposed SourcePackageRe
parse and store the recipe. Exposed SourcePackageRe
SourcePackageRe
these cannot be exposed yet. Further work is required to either change its
type or make its type exposable.
LaunchpadObject
but they are non-Ubuntu PPAs, and as such are not accessible via the web
service. This branch changes makeArchive to use Ubuntu when creating ppas
(unless overridden).
Implemented patch_list_
Implemented ws_obj to make it convenient to translate a database object into a webservice object.
== Tests ==
bin/test -t TestWebservice test_sourcepack
== Demo and Q/A ==
None
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files:
lib/lp/
lib/lp/
lib/canonical
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/canonical
== Pyflakes notices ==
lib/lp/
8: 'CodeImportAlre
8: 'CodeImportNotI
8: 'BranchMergePro
11: 'BranchCreatorN
11: 'IBranchSet' imported but unused
11: 'IBranch' imported but unused
11: 'BranchExists' imported but unused
11: 'BranchCreatorN
14: 'IBranchMergePr
15: 'IBranchSubscri
16: 'ICodeImport' imported but unused
17: 'ICodeReviewCom
18: 'ICodeReviewVot
19: 'IStaticDiff' imported but unused
19: 'IDiff' imported but unused
19: 'IPreviewDiff' imported but unused
20: 'ISourcePackage
21: 'ISourcePackage
== Pylint notices ==
lib/lp/
21: [C0301] Line too long (81/78)
19: [W0611] Unused import IDiff
8: [W0611] Unused import CodeImportAlrea
15: [W0611] Unused import IBranchSubscription
11: [W0611] Unused import BranchCreatorNo
8: [W0611] Unused import CodeImportNotIn
14: [W0611] Unused import IBranchMergePro
11: [W0611] Unused import BranchCreatorNo
16: [W0611] Unused import ICodeImport
20: [W0611] Unused import ISourcePackageR
18: [W0611] Unused import ICodeReviewVote
11: [W0611] Unused import IBranchSet
19: [W0611] Unused import IStaticDiff
11: [W0611] Unused import IBranch
19: [W0611] Unused import IPreviewDiff
8: [W0611] Unused import BranchMergeProp
11: [W0611] Unused import BranchExists
21: [W0611] Unused import ISourcePackageR
17: [W0611] Unused import ICodeReviewComment
lib/lp/
245: [E1002, TestRecipeBranc
lib/lp/
411: [E1002, PersonNameField
851: [C0322, IPersonPublic.
distroserie
^
name=
recipe_
sourcepacka
)
@export_
def createRecipe(name, description, recipe_text, distroseries,
sourcepacka
1408: [C0322, IPersonEditRest
status=
^
comment=
@export_
def addMember(person, reviewer, status=
comment=None, force_team_
may_
1449: [C0322, IPersonEditRest
comment=Text())
^
@export_
def acceptInvitatio
1461: [C0322, IPersonEditRest
comment=Text())
^
@export_
def declineInvitati
1749: [C0322, IPersonSet.newTeam] Operator not preceded by a space
defaultmemb
^
defaultrene
@operation_
subscriptio
title=
required=False, default=
@export_
ITeam, ['name', 'displayname', 'teamdescription',
'defaultmem
def newTeam(teamowner, name, displayname, teamdescription
subscriptio
defaultmemb
1818: [C0322, IPersonSet.
created_
^
title=
created_
title=
)
@operation_
@export_
def findPerson(text="", exclude_
must_
created_
lib/lp/
132: [C0322, ISourcePackageR
distroserie
^
)
@export_
def requestBuild(
lib/lp/
301: [W1001, Person] Use of "property" on an old style class
317: [W1001, Person] Use of "property" on an old style class
331: [W1001, Person] Use of "property" on an old style class
1263: [W0104, Person.addMember] Statement seems to have no effect
The exported registrant and owner in the interface need to be slightly oice' is the better choice for the registrant rather than just
more constrained. Looking at the IBranch interface, it seems that
'PublicPersonCh
Reference. I recall there being a big hoo-ha over it when we initially had
some privacy issues around person.
registrant = exported(
PublicPersonCh oice(
title= _("The person who created this recipe."),
required= True, readonly=True,
vocabulary ='ValidPersonOr Team'))
And similarly, the owner should be constrained to the person or a team the
person is a member of, otherwise someone would be able to pass off the recipe
to anyone else (which we don't support elsewhere).
owner = exported(
ParticipatingP ersonChoice(
title= _('Owner' ),
required= True, readonly=False,
vocabulary ='UserTeamsPart icipationPlusSe lf',
descriptio n=_("The person or team who can edit this recipe.")))
In the operation_ parameters for requestBuild you have pocket one space
dedented from the others.
lib/lp/ registry/ interfaces/ person. py
- You need a blank line between the end of createRecipe and getRecipe.