changed dict to OrderedDict so as to align the scans in correct order. - #156
Merged
Merged
Conversation
… and accordingly modified the test cases expected json files Signed-off-by: Pratikrocks <pratikrocks.dey11@gmail.com>
steven-esser
approved these changes
Apr 13, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this Pr I changed the
DicttoOrderedDictwhen we are making the index files.I changed this because :
1.To make the deltas to appear in the manner in which it is present in the scancode scans,Currently the deltas are appearing in a jumbled order.
Example: a delta having a new file path as
src/jarabe/view/viewhelp_webkit2.py(link) is appearing before a delta having a path assrc/jarabe/view/viewhelp_webkit1.py(link), the paths are not arranged properly.It would look better if deltas are arranged as per their paths in an top-down fashion of their paths2.Moreover when we will port deltacode to python3 then
Dictby default places the keys as if they appear sorted by insertion order, In Python 2Dictplaces the keys in jumbled order.However usingOrdered Dictwill restore the uniformity in both Py2 and Py3. refIf we do not use ordered dict we may fail for some test cases when we are using py2 in CI 's