Jump to >

rbtools.utils.match_score

Utilities for applying matching scores for summaries and descriptions.

Deprecated since version 3.1: This will be removed in RBTools 4.0.

Classes

Score(summary_score, description_score)

Encapsulates ranking information for matching existing requests.

class rbtools.utils.match_score.Score(summary_score, description_score)[source]

Bases: object

Encapsulates ranking information for matching existing requests.

This is currently used with ‘rbt post -u’ to match the new change with existing review requests. The ‘get_match’ method will return a new Score, and then multiple scores can be ranked against each other.

Deprecated since version 3.1: This will be removed in RBTools 4.0.

EXACT_MATCH_SCORE = 1.0[source]
__init__(summary_score, description_score)[source]
is_exact_match()[source]
static get_match(summary_pair, description_pair)[source]

Get a score based on a pair of summaries and a pair of descriptions.

The scores for summary and description pairs are calculated independently using SequenceMatcher, and returned as part of a Score object.