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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Westby | Approve | ||
Review via email:
|
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.
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