-
-
Notifications
You must be signed in to change notification settings - Fork 574
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 new flag in License Data Model definition #2548
Conversation
@akugarg btw when you link the issue using the keywords it'll be closed. This is a general big-picture issue, so feel free to create smaller issues and link to them. Also, the commit messages are the same here and they should be more specific and different IMO. Atleast:
If you could rebase to change the messages that'd be great. |
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
@AyanSinhaMahapatra I have made the requested changes. |
From discuss@gitter Ayan Sinha Mahapatra: I see two issues:
|
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
import os, glob os.chdir("git/scancode-toolkit/src/licensedcode/data/rules") Used the above script for finding the "unknown" tag in license expression and for ignoring the false-positive case. |
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
@akugarg btw, in addition to processing the
|
For adding to license class I have to add similar tag like ones present here https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/models.py#L102 set to default = false |
Yes! |
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
When I am trying to add flag for license class and trying to run a scan for samples directory it is showing this error.. |
@akugarg you could push your changes for addition of the flag to License Model if you want us to have a look at it (there's no point guessing where the failure is without the code), and always run the specific tests for licensedcode first and fix failures there before actually running a whole scan. Also, you could also try to fix your tests first for the addition of |
OKay! I will first fix the test cases for flag addition to rule class only. |
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
@AyanSinhaMahapatra Please have a look at this once! |
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
@akugarg The test expectations need to be changed in many cases like this. Btw, note that you can set There's also another test to be added, which fetches the corresponding license object for We're nearly there! 👍 |
1100c2e
to
e62be42
Compare
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
In order means that instead of having the flag added at end in YAML files as done here we should have inserted in between (may be after license expression or some flags) according to as defined in object definition right? |
@akugarg I think you should instead use load_rules() and then check for unknown in license expression explicitly, set the There are similar functions for licenses also. You should also merge to latest before doing this (delete the commits adding the is_unknown flag to .yml files by rebasing, merge to latest develop, and then add the changes as suggested), some more unknown rules were added. |
This reverts commit 4fa04ff. Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
@akugarg this is ready to merge imho but you have one failing test |
@pombredanne I am not able to figure out what's causing this failing check or if it is something related to what I added. |
db4dcd7
to
a4194e6
Compare
@AyanSinhaMahapatra |
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.
Looking good now.
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.
There are a few nits for your consideration, but this is good to go otherwise! Thanks
This reverts commit a1843cf. Signed-off-by: akugarg <akanksha.garg2k@gmail.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
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.
All good!
Merging
Signed-off-by: akugarg akanksha.garg2k@gmail.com
Fixes #2549
Tasks
Run tests locally to check for errors.