Merge lp://staging/~jml/pkgme/reason-for-want into lp://staging/pkgme

Proposed by Jonathan Lange
Status: Merged
Approved by: Jonathan Lange
Approved revision: 120
Merged at revision: 105
Proposed branch: lp://staging/~jml/pkgme/reason-for-want
Merge into: lp://staging/pkgme
Diff against target: 438 lines (+191/-33)
7 files modified
doc/backends/index.txt (+8/-1)
pkgme/backend.py (+73/-17)
pkgme/backends/dummy/want (+1/-1)
pkgme/backends/python/want (+2/-1)
pkgme/tests/test_backend.py (+99/-4)
pkgme/tests/test_python_backend.py (+3/-4)
pkgme/tests/test_vala_backend.py (+5/-5)
To merge this branch: bzr merge lp://staging/~jml/pkgme/reason-for-want
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+103917@code.staging.launchpad.net

Commit message

Allow backends to provide a reason for wanting or not wanting to package a project.

Description of the change

Sometimes, when using pkgme on a project that you are *certain* should be packageable, pkgme says that there are no eligible backends. In those cases, it's really difficult to figure out why a backend has decided that it can't package something.

This patch allows backends to specify an optional reason in their 'want' script. It does this by allowing 'want' to output a JSON dict instead of just an integer. The JSON dict must have a 'score' key and may have a 'reason' key. The value of 'reason' is displayed in NoEligibleBackends if provided.

To post a comment you must log in.
119. By Jonathan Lange

Clean up XXXs that have since been fixed.

Revision history for this message
James Westby (james-w) wrote :

Hi,

291 + def test_want_script_with_missing_score(self):

should be ..._missing_reason I think?

Aside from that they only change I might make would be to extract a
method for running a python script with a given want response as
that is repeated in a few tests. I'm happy for it to land without
that change though.

Thanks,

James

review: Approve
120. By Jonathan Lange

Handle empty want scripts too.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches