Comments (9)
@majurg What labels would you like to use? We could use license added
and license removed
, but these don't seem to convey the binary nature of what we want to indicate, i.e., that the new/old file has/had no license info.
from deltacode.
We can probably just use license info added
and license info removed
for now.
from deltacode.
OK.
from deltacode.
@majurg Note that, as expected, this new category will be triggered if, for example, one side of the Delta pair has license scores all of which are below the cutoff_score
and the other side has at least one license score >= the cutoff_score
.
from deltacode.
@johnmhoran That sounds good. It should also work when one side is missing license info and the other has license info, regardless of score.
from deltacode.
I'm glad you mentioned that, @majurg . That adds a slight wrinkle to the new structure of _license_diff()
but I think I have in mind a straightforward way to handle it.
This test, for example, currently passes, and we'd also want it to pass if the old_file
score
were < the cutoff_score
:
def test_Delta_license_diff_new_no_license_info(self):
new_file = models.File({'path': 'new/path.txt'})
old_file = models.File({'path': 'old/path.txt', 'licenses': [{'key': 'mit', 'score': 50.0}]})
result = deltacode.Delta(new_file, old_file, 'modified')
assert result.category == 'license info removed'
from deltacode.
yes
from deltacode.
This is ready for a PR, feel free to open at your convenience.
from deltacode.
merged #39, closing.
from deltacode.
Related Issues (20)
- Add limited delta stats after running HOT 1
- Upgrade DeltaCode to Python 3 HOT 4
- Create DeltaCode documentation on ReadTheDocs HOT 6
- Linux and MacOs buid is showing some warnings in TravisCI HOT 3
- configure failed,why? HOT 10
- Adding Azure Pipelines HOT 1
- In the output content format ‘[ ’how to understand? HOT 2
- Configure failed with "file setup.py not found" HOT 11
- Azure Piplines seems to be filing for Windows Test Jobs
- Create objects to score scan information HOT 6
- Add function to handle loading 2 codebases. HOT 2
- Remove redundant Scan model HOT 1
- Remove redundant File model
- Add Dockerfile
- Separate csv formatted output in Deltacode
- Merge DeltaCode in ScanCode TK
- Update structure to use the https://github.com/nexB/skeleton
- RFC: DeltaCode next! and roadmap HOT 2
- Update documentation after deltacode gets merge in scancode-toolkit HOT 2
- License detection diffs are incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deltacode.