Skip to content
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 license rule importance flags #1140

Merged
merged 10 commits into from
Jul 27, 2018

Conversation

pombredanne
Copy link
Member

This PR add a new set of flags on license rule to state the importance of a rule for #979. A rule is more important if its detection is the clearer mark of a license.
The importance flags are:

  • is_license_text: this is a full license text
  • is_license_notice: this is a license notice
  • is_license_reference: this is a only a reference to a license and therefore may not be as strong
  • is_license_tag: this is a a structured, coded license reference such as a SPDX-License-Identifier and is typically a strong license reference albeit a short one.
    Licenses are also tagged using a first set of heuristics and then a review.

License importance is useful for improve summarization and license determination automation for #377

Signed-off-by: Philippe Ombredanne [email protected]

@codecov
Copy link

codecov bot commented Jul 24, 2018

Codecov Report

Merging #1140 into develop will increase coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1140      +/-   ##
===========================================
+ Coverage    84.11%   84.31%   +0.19%     
===========================================
  Files          113      113              
  Lines        12422    12592     +170     
===========================================
+ Hits         10449    10617     +168     
- Misses        1973     1975       +2
Impacted Files Coverage Δ
src/scancode/interrupt.py 39.47% <0%> (-2.64%) ⬇️
src/licensedcode/cache.py 94.11% <0%> (-1.69%) ⬇️
src/scancode/api.py 93.18% <0%> (-1.52%) ⬇️
src/cluecode/copyrights_hint.py 100% <0%> (ø) ⬆️
src/licensedcode/models.py 79.48% <0%> (+0.46%) ⬆️
src/cluecode/copyrights.py 94.49% <0%> (+1.39%) ⬆️
src/scancode/cli.py 76.84% <0%> (+1.43%) ⬆️
src/summarycode/copyright_summary.py 79.79% <0%> (+4.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c423cf...462eb84. Read the comment docs.

And do not use a default License text for these

Signed-off-by: Philippe Ombredanne <[email protected]>
Also remove or update some rules as needed

Signed-off-by: Philippe Ombredanne <[email protected]>
Also remove or update some rules as needed

Signed-off-by: Philippe Ombredanne <[email protected]>
Also remove or update some rules as needed

Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Add is_ prefix to negative and false_positive flags
This is consistent with the naming of other flags.

Signed-off-by: Philippe Ombredanne <[email protected]>
@pombredanne pombredanne force-pushed the 979-license-rule-importance-flags branch from f3c0f82 to 462eb84 Compare July 26, 2018 14:18
@pombredanne
Copy link
Member Author

This is also renaming rule flaqs negative to is_negative and false_positive to is_false_positive
All tests passing ... merging now.

@pombredanne pombredanne merged commit 2005d08 into develop Jul 27, 2018
@pombredanne pombredanne deleted the 979-license-rule-importance-flags branch July 27, 2018 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant