Skip to content

Commit b0aa437

Browse files
committed
[SP-2874]: rename to recursive_threshold
1 parent b2e512b commit b0aa437

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
## [1.32.0] - 2025-08-13
1313
### Added
14-
- Add `--min-cutoff-threshold` argument to folder scan command
14+
- Add `--recursive-threshold` argument to folder scan command
1515
- Add `--depth` argument to `folder-scan` and `folder-hash` commands
1616

1717
## [1.35.0] - 2025-10-07

src/protoc_gen_swagger/options/annotations_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import warnings
55

66

7-
GRPC_GENERATED_VERSION = '1.73.0'
7+
GRPC_GENERATED_VERSION = '1.73.1'
88
GRPC_VERSION = grpc.__version__
99
_version_not_supported = False
1010

src/protoc_gen_swagger/options/openapiv2_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import warnings
55

66

7-
GRPC_GENERATED_VERSION = '1.73.0'
7+
GRPC_GENERATED_VERSION = '1.73.1'
88
GRPC_VERSION = grpc.__version__
99
_version_not_supported = False
1010

src/scanoss/cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
from .constants import (
6161
DEFAULT_API_TIMEOUT,
6262
DEFAULT_HFH_DEPTH,
63-
DEFAULT_HFH_MIN_CUTOFF_THRESHOLD,
6463
DEFAULT_HFH_RANK_THRESHOLD,
64+
DEFAULT_HFH_RECURSIVE_THRESHOLD,
6565
DEFAULT_POST_SIZE,
6666
DEFAULT_RETRY,
6767
DEFAULT_TIMEOUT,
@@ -878,10 +878,10 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
878878
help=f'Defines how deep to scan the root directory (optional - default {DEFAULT_HFH_DEPTH})',
879879
)
880880
p_folder_scan.add_argument(
881-
'--min-cutoff-threshold',
881+
'--recursive-threshold',
882882
type=float,
883-
default=DEFAULT_HFH_MIN_CUTOFF_THRESHOLD,
884-
help=f'Minimum score threshold to consider a match (optional - default: {DEFAULT_HFH_MIN_CUTOFF_THRESHOLD})',
883+
default=DEFAULT_HFH_RECURSIVE_THRESHOLD,
884+
help=f'Minimum score threshold to consider a match (optional - default: {DEFAULT_HFH_RECURSIVE_THRESHOLD})',
885885
)
886886
p_folder_scan.set_defaults(func=folder_hashing_scan)
887887

@@ -2477,7 +2477,7 @@ def folder_hashing_scan(parser, args):
24772477
scanoss_settings=scanoss_settings,
24782478
rank_threshold=args.rank_threshold,
24792479
depth=args.depth,
2480-
min_cutoff_threshold=args.min_cutoff_threshold,
2480+
recursive_threshold=args.recursive_threshold,
24812481
)
24822482

24832483
if scanner.scan():

src/scanoss/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515

1616
DEFAULT_HFH_RANK_THRESHOLD = 5
1717
DEFAULT_HFH_DEPTH = 1
18-
DEFAULT_HFH_MIN_CUTOFF_THRESHOLD = 0.25
18+
DEFAULT_HFH_RECURSIVE_THRESHOLD = 0.8

src/scanoss/scanners/scanner_hfh.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
from scanoss.constants import (
3333
DEFAULT_HFH_DEPTH,
34-
DEFAULT_HFH_MIN_CUTOFF_THRESHOLD,
3534
DEFAULT_HFH_RANK_THRESHOLD,
35+
DEFAULT_HFH_RECURSIVE_THRESHOLD,
3636
)
3737
from scanoss.cyclonedx import CycloneDx
3838
from scanoss.file_filters import FileFilters
@@ -60,7 +60,7 @@ def __init__( # noqa: PLR0913
6060
scanoss_settings: Optional[ScanossSettings] = None,
6161
rank_threshold: int = DEFAULT_HFH_RANK_THRESHOLD,
6262
depth: int = DEFAULT_HFH_DEPTH,
63-
min_cutoff_threshold: float = DEFAULT_HFH_MIN_CUTOFF_THRESHOLD,
63+
recursive_threshold: float = DEFAULT_HFH_RECURSIVE_THRESHOLD,
6464
):
6565
"""
6666
Initialize the ScannerHFH.
@@ -72,7 +72,7 @@ def __init__( # noqa: PLR0913
7272
scanoss_settings (Optional[ScanossSettings]): Optional settings for Scanoss.
7373
rank_threshold (int): Get results with rank below this threshold (default: 5).
7474
depth (int): How many levels to scan (default: 1).
75-
min_cutoff_threshold (float): Minimum score threshold to consider a match (default: 0.25).
75+
recursive_threshold (float): Minimum score threshold to consider a match (default: 0.25).
7676
"""
7777
self.base = ScanossBase(
7878
debug=config.debug,
@@ -102,7 +102,7 @@ def __init__( # noqa: PLR0913
102102
self.client = client
103103
self.scan_results = None
104104
self.rank_threshold = rank_threshold
105-
self.min_cutoff_threshold = min_cutoff_threshold
105+
self.recursive_threshold = recursive_threshold
106106

107107
def scan(self) -> Optional[Dict]:
108108
"""
@@ -114,7 +114,7 @@ def scan(self) -> Optional[Dict]:
114114
hfh_request = {
115115
'root': self.folder_hasher.hash_directory(path=self.scan_dir),
116116
'rank_threshold': self.rank_threshold,
117-
'min_cutoff_threshold': self.min_cutoff_threshold,
117+
'recursive_threshold': self.recursive_threshold,
118118
}
119119

120120
spinner = Spinner('Scanning folder...')

0 commit comments

Comments
 (0)