Merge lp://staging/~bryce/launchpad/lp-617699-api into lp://staging/launchpad/db-devel
Proposed by
Bryce Harrington
Status: | Merged |
---|---|
Approved by: | Gavin Panella |
Approved revision: | no longer in the source branch. |
Merged at revision: | 9908 |
Proposed branch: | lp://staging/~bryce/launchpad/lp-617699-api |
Merge into: | lp://staging/launchpad/db-devel |
Prerequisite: | lp://staging/~bryce/launchpad/lp-644794-db-foreign-keys |
Diff against target: |
574 lines (+271/-31) 10 files modified
lib/canonical/launchpad/interfaces/_schema_circular_imports.py (+17/-2) lib/canonical/launchpad/webapp/batching.py (+18/-0) lib/canonical/launchpad/webapp/configure.zcml (+8/-0) lib/lp/bugs/browser/bugtracker.py (+15/-1) lib/lp/bugs/browser/configure.zcml (+12/-1) lib/lp/bugs/configure.zcml (+4/-1) lib/lp/bugs/interfaces/bugtracker.py (+30/-15) lib/lp/bugs/model/bugtracker.py (+34/-2) lib/lp/bugs/tests/test_bugtracker_components.py (+131/-7) lib/lp/testing/factory.py (+2/-2) |
To merge this branch: | bzr merge lp://staging/~bryce/launchpad/lp-617699-api |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+37824@code.staging.launchpad.net |
Commit message
Add getter/setter property for linking distribution/
Description of the change
Expose distribution source package functionality for component linking in API.
This branch is to expose launchpad API calls for interacting with the component and component group objects, used to model the component and product values in Bugzilla. Most of the needed api functionality was implemented in an earlier branch, but this adds support for distro_
To post a comment you must log in.
Hi Bryce,
This is good stuff, but needs some more work before it can land. From
a code point of view I think the most important points are:
[3] Nothing is returned from a property getter, though I think the
test for this is correct. I suspect the test hasn't been run ;)
[8] Interface for Reference field needs updating. This is preventing
the branch from building. Also, a simple test for accessing the
field via the web API should be added, if one does not yet
exist.
Gavin.
[1]
I think you'll need to get a database review for schema/ comments. sql, database/ schema/ patch-2208- 19-0.sql and schema/ patch-2208- 20-0.sql. I think stub and jml are the only
database/
database/
ones who can grant that.
[2]
+ distro_ source_ package = exported(
I was suprised to find that this spelling is more common than source_ package. No change needed here, just an
distribution_
observation.
[3]
+ def _getDistroSourc ePackage( self): package_ name is None: on.getSourcePac kage( package_ name)
+ """Retrieves the corresponding source package"""
+ if self.distribution is None or self.source_
+ return None
+ self.distributi
+ self.source_
This doesn't return the distribution source package, so I'm not sure distro_ source_ package succeeds!
how test_link_
Also, as it's intended solely for a property, I think it should be source_ package( ). I think
named after the property, thus _get_distro_
it's clearer if the method naming policy is bent a little here.
[4]
+ def _setDistroSourc ePackage( self, distro_ source_ package) :
Same naming suggestion as in [3]. It doesn't matter much though.
[5]
+ distro_ source_ package = property( _getDistroSourc ePackage, ePackage)
+ _setDistroSourc
Consider adding a doc parameter, even if it just says "See ponent` ".
`IBugTrackerCom
[6]
{{{ bugs/interfaces /bugtracker. py bugs/model/ bugtracker. py ourcePackage' imported but unused bugs/tests/ test_bugtracker _components. py
./lib/lp/
524: E501 line too long (82 characters)
524: Line exceeds 78 characters.
./lib/lp/
92: 'SourcePackageName' imported but unused
89: 'IDistributionS
770: E501 line too long (80 characters)
775: E302 expected 2 blank lines, found 1
770: Line exceeds 78 characters.
./lib/lp/
16: E302 expected 2 blank lines, found 1
}}}
Please fix this lint.
[7]
make lint also makes the following complaints:
{{{ sampledata/ current. sql sampledata/ lintdata. sql differs from database/ sampledata/ current. sql. sampledata/ current. sql ftest_template database. sampledata/ lintdata. sql is correct, copy it to sampledata/ current. sql. sampledata/ current. sql and run: sampledata/ current. sql
database/
database/
Patches to the schema, or manual edits to database/
do not match the dump of the launchpad_
If database/
database/
Otherwise update database/
make schema
make newsampledata
cd database/sampledata
cp newsampledata.sql database/
Run make schema again to update the test/dev database.
database/ sampledata/ current. sql sampledata/ lintdata- dev.sql differs from database/ sampledata/ current- de...
database/