Merge lp://staging/~gary-lasker/software-center/recommended-installed-feedback into lp://staging/software-center
Status: | Merged |
---|---|
Merged at revision: | 3153 |
Proposed branch: | lp://staging/~gary-lasker/software-center/recommended-installed-feedback |
Merge into: | lp://staging/software-center |
Prerequisite: | lp://staging/~gary-lasker/software-center/update-to-latest-recommender-client |
Diff against target: |
942 lines (+356/-133) 11 files modified
softwarecenter/backend/piston/sreclient_pristine.py (+1/-1) softwarecenter/backend/recagent.py (+26/-1) softwarecenter/enums.py (+4/-0) softwarecenter/ui/gtk3/panes/availablepane.py (+3/-10) softwarecenter/ui/gtk3/views/appdetailsview.py (+7/-7) softwarecenter/ui/gtk3/views/catview_gtk.py (+59/-39) softwarecenter/ui/gtk3/widgets/containers.py (+41/-17) softwarecenter/ui/gtk3/widgets/recommendations.py (+79/-29) tests/gtk3/test_catview.py (+117/-21) tests/gtk3/windows.py (+9/-8) tests/test_recagent.py (+10/-0) |
To merge this branch: | bzr merge lp://staging/~gary-lasker/software-center/recommended-installed-feedback |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt (community) | Approve | ||
Review via email: mp+122154@code.staging.launchpad.net |
This proposal supersedes a proposal from 2012-08-28.
Commit message
* lp:~gary-lasker/software-center/recommended-installed-feedback:
- signal the recommender service when a recommended item has been
successfully installed, refactor and clean up surrounding code,
new unit tests for the feature (LP: #944060, LP: #1044107)
Description of the change
This branch implements the "implicit" recommender feedback feature. It detects the case where the user successfully installs a recommended item and fires a "submit_
This is the client-side implementation for bug 944060.
Note that this branch depends on the lp:~gary-lasker/software-center/update-to-latest-recommender-client branch as that branch adds the new recommender client code from lp:~canonical-ca-hackers/ubuntu-recommender/ubuntu-recommender-client. Also note that I made one small change to sreclient to fix the validate decorator for the pkgname argument to implicit_feedback so that it matches the validator for the other calls that use pkgname as an argument.
Finally, I added a unit test for the new call in test_recagent.py, however like a few of the other tests there, the test is not currently working with the server. Therefore, it remains disabled as the other tests are. I'll look at this tomorrow to try to see what the issue is with these tests.
Meanwhile, everything here should be working. To test, just select any recommended item in the lobby or category views and install it. Once the installation is complete, the corresponding implicit_feedback call will be fired.
Many thanks for your review!
On Tue, Aug 28, 2012 at 05:46:23AM -0000, Gary Lasker wrote:
> Gary Lasker has proposed merging lp:~gary-lasker/software-center/recommended-installed-feedback into lp:software-center with lp:~gary-lasker/software-center/update-to-latest-recommender-client as a prerequisite.
Thanks for working on this branch. I'm very happy to see this feature
coming.
[..]
> Note that this branch depends on the lp:~gary-lasker/software-center/update-to-latest-recommender-client branch as that branch adds the new recommender client code from lp:~canonical-ca-hackers/ubuntu-recommender/ubuntu-recommender-client. Also note that I made one small change to sreclient to fix the validate decorator for the pkgname argument to implicit_feedback so that it matches the validator for the other calls that use pkgname as an argument.
Thanks for this, if you fixed the sreclient_ pristine. py, please also
send the diff to the server team (if you haven't done already) so that
they add it to their
lp:~canonical-ca-hackers/ubuntu-recommender/ubuntu-recommender-client
branch.
> Finally, I added a unit test for the new call in test_recagent.py, however like a few of the other tests there, the test is not currently working with the server. Therefore, it remains disabled as the other tests are. I'll look at this tomorrow to try to see what the issue is with these tests.
[..]
Maybe the staging server had problems. I just tested enabling them and
its working, but that may well be that its now fixed. While looking at
the test code I noticed that there is a bit of duplication in
there, I pushed a branch at
lp:~mvo/software-center/recagent-test-cleanup that removes most of
that.
I also noticed that the branch is missing a test for the new test_recommenda tions_widget. py. Something like activate a r_agent. post_implicit_ feedback( ) call was done.
functionality, it would be nice to add one to
tests/gtk3/
app, trigger a install transaction and verify that on finish the
self.recommende
> @@ -244,7 +262,7 @@ anon_profile_ data(self, spawner, submit_ anon_profile) : "submit- anon_profile" , piston_ submit_ anon_profile) "submit- anon-profile- finished" , piston_ submit_ anon_profile)
>
> def _on_submit_
> piston_
> - self.emit(
> + self.emit(
Nice that this is more consistent now (plus that it will actually work).
> === modified file 'softwarecenter /enums. py' enums.py 2012-08-23 14:37:28 +0000 enums.py 2012-08-28 05:45:23 +0000 ATIONS_ CAROUSEL_ LIMIT = 9 RECOMMENDATIONS _CAROUSEL_ LIMIT = 4 S_FEEDBACK_ INSTALLED = "installed"
> --- softwarecenter/
> +++ softwarecenter/
> @@ -299,6 +299,9 @@
> LOBBY_RECOMMEND
> DETAILS_
>
> +# action values for recommendations implicit feedback
> +RECOMMENDATION
> +
That looks like we could use:
class RecommenderFeed back:
INSTALLED = "installed"
(so that later "REMOVED" can be added there as well and its more
consitent with the rest of enums.py).
[..] _activated( self, catview, app): "application- activated" , app) r_agent. i...
> def _on_application
> self.emit(
> + # we only track installed items of the user has opted-in to the
> + # recommendations service
> + if self.recommende