Skip to content

Smarter fuzzywuzzy ratio #1

@dwu402

Description

@dwu402

Parsing two similar expecting files where one is a substring of another causes problems when using fuzzywuzzy's partial_ratio.

This is particularly problematic in the _load method of Project when selecting the best matching expecting.

Example

expecting = ['functions.py', 'test_functions.py']
file = 'student123456_test_functions.py'
ratios = [unicity._check_fuzzy_ratio(file, expect) for expect in expecting]

>>> ratios = [100, 100]

Request

Use a different method for fuzzy compare that deals with substring collisions in expecting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions