Merge lp://staging/~gary-lasker/software-center/update-to-latest-recommender-client into lp://staging/software-center
Status: | Merged |
---|---|
Merged at revision: | 3130 |
Proposed branch: | lp://staging/~gary-lasker/software-center/update-to-latest-recommender-client |
Merge into: | lp://staging/software-center |
Diff against target: |
138 lines (+48/-7) 5 files modified
softwarecenter/backend/piston/sreclient_pristine.py (+26/-2) softwarecenter/backend/recagent.py (+5/-3) softwarecenter/config.py (+5/-2) softwarecenter/utils.py (+7/-0) tests/test_utils.py (+5/-0) |
To merge this branch: | bzr merge lp://staging/~gary-lasker/software-center/update-to-latest-recommender-client |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
software-store-developers | Pending | ||
Review via email:
|
Commit message
* lp:~gary-lasker/software-center/update-to-latest-recommender-client:
- update to the latest recommender client API and replaces the
deprecated recommend_me call with the new recommend_me call that
includes the UUID
Description of the change
This branch updates the USC client to the latest version of the recommender API as found in lp:~canonical-ca-hackers/ubuntu-recommender/ubuntu-recommender-client. As part of the update we've moved from the deprecated recommend-me call that did not include a UUID to the updated recommend me call that does include a UUID. In making this update I discovered that the server does not support UUID values with dashes in them, so this condition is handled now for both for new UUIDs generated in all future opt-ins as well as for all previous UUID values in the field that still have dashes in them.
This branch also includes the new implicit_feedback call but does not use it yet. This will be used in a separate branch that is currently in-progress and that will depend on this one.
Many thanks for taking the time to review this!
On Mon, Aug 27, 2012 at 09:20:29PM -0000, Gary Lasker wrote:
> Gary Lasker has proposed merging lp:~gary-lasker/software-center/update-to-latest-recommender-client into lp:software-center.
Thanks for your branch, that looks good. A small test would be good,
to ensure to not break this again in some future refactor. Should we
as simply as:
def test_uuid_ conversion( self): config. recommender_ uuid = "xx-yy-zz" assertEqual( self.config. recommender_ uuid, "xxyyzz")
self.
self.
[..] /backend/ recagent. py' backend/ recagent. py 2012-08-15 11:21:05 +0000 backend/ recagent. py 2012-08-27 21:19:21 +0000 profile_ data ).replace( "-", "")
> === modified file 'softwarecenter
> --- softwarecenter/
> +++ softwarecenter/
> @@ -123,7 +123,7 @@
> if not recommender_uuid:
> # generate a new uuid, but do not save it yet, this will
> # be done later in _on_submit_
> - recommender_uuid = get_uuid()
> + recommender_uuid = get_uuid(
My gut feeling is that the get_uuid() call should do the replace, recommender_ uuid() call? Just so that its all
maybe as a new generate_
in one place. So that if the call is re-used there is no suprise that
the result is different from what the recommender agent expects.
Cheers,
Michael