-
-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fingerprint plugin #1651
Add fingerprint plugin #1651
Conversation
Signed-off-by: arnav-mandal1234 <arnav.mandal1234@gmail.com>
Codecov Report
@@ Coverage Diff @@
## develop #1651 +/- ##
============================================
- Coverage 81.16% 13.08% -68.08%
============================================
Files 125 125
Lines 15478 15478
============================================
- Hits 12563 2026 -10537
- Misses 2915 13452 +10537
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## develop #1651 +/- ##
===========================================
+ Coverage 81.16% 81.18% +0.01%
===========================================
Files 125 125
Lines 15478 15478
===========================================
+ Hits 12563 12566 +3
+ Misses 2915 2912 -3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See some minor comments. Others (@JonoYang and @pombredanne) may have more feedback for you as well.
plugins/scancode-fingerprint/NOTICE
Outdated
Software license | ||
================ | ||
|
||
Copyright (c) 2017 nexB Inc. and others. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should bump this copyright year to the current year, or simply remove the date portion entirely.
@@ -0,0 +1 @@ | |||
A ScanCode scan plugin to generate fingerprints using Simhash algorithm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a bit more detail here? Maybe some short background on the algorithm or some links AND how to go about running it from the command line?
|
||
def hamming_distance(self, fingerprint1, fingerprint2): | ||
""" | ||
Return hamming distance between two given fingerprints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a bit more detail here in the docstring as to what hamming distance numbers mean what? For example, what would one expect the hamming distance to be for similar files and what would it be for completely different files. You can sort of get an idea of this looking at the test cases, but it would nice to have that information in the source code for future reference.
""" | ||
def __init__(self): | ||
self.tokens = [] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor formatting issue: there should be one new line between methods and two new lines between functions and classes.
Signed-off-by: arnav-mandal1234 <arnav.mandal1234@gmail.com>
Original PR: #1576 [closed as something went wrong during final rebasing]