Skip to content

Commit 4ec302a

Browse files
committed
Add tests for origin summary plugin
* Increase majority threshold to 0.75 Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 5d2753d commit 4ec302a

6 files changed

Lines changed: 3919 additions & 3 deletions

File tree

src/scancode/plugin_summary.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2018 nexB Inc. and others. All rights reserved.
2+
# Copyright (c) 2019 nexB Inc. and others. All rights reserved.
33
# http://nexb.com and https://github.com/nexB/scancode-toolkit/
44
# The ScanCode software is licensed under the Apache License version 2.0.
55
# Data generated with ScanCode require an acknowledgment.
@@ -142,7 +142,7 @@ def process_codebase(self, codebase, **kwargs):
142142

143143
def is_majority(count, files_count):
144144
"""
145-
Return True is this resource is a whatever directory with at least over 50% of whatever at full depth.
145+
Return True is this resource is a whatever directory with at least over 75% of whatever at full depth.
146146
"""
147147
# TODO: Increase this and test with real codebases
148-
return count / files_count >= 0.5
148+
return count / files_count >= 0.75

0 commit comments

Comments
 (0)