Merge lp:~seif/zeitgeist/rewrite-find-related-uris into lp:zeitgeist/0.1
Proposed by
Seif Lotfy
Status: | Merged |
---|---|
Approved by: | Seif Lotfy |
Approved revision: | 1627 |
Merged at revision: | 1619 |
Proposed branch: | lp:~seif/zeitgeist/rewrite-find-related-uris |
Merge into: | lp:zeitgeist/0.1 |
Diff against target: |
185 lines (+42/-85) 1 file modified
_zeitgeist/engine/main.py (+42/-85) |
To merge this branch: | bzr merge lp:~seif/zeitgeist/rewrite-find-related-uris |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Markus Korn | code, tests | Approve | |
Review via email: mp+38746@code.launchpad.net |
Description of the change
I took the time to rewrite the find_related_uris to use a more or less graph structuring before pushing everything into one pot and going through a 1-step aproiri.
The results are the same except for one test case where [i1, i3, i5] is expected but [i3, i1, i5] is sent. However this results is also right since i3 and i2 both have the same count = 2 but were sorted differently whereas i5 count = 1.
The new code is documented and is much shorter allowing me to get rid of many custom helpers that were written for find_related_uris.
If this branch is ok with you i will change the last test case and merge it.
Cheers
Seif
To post a comment you must log in.
I had some discussions with seif on irc about this changes, and I'm happy with the final result.