Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Fuzzymatch function outputs some inconsistent results #217

Closed Baptiste37 closed 9 months ago

Baptiste37 commented 9 months ago

Bug description

When calculating datacenters impacts, the fuzzymatch function outputs a "model_range" whatever the string entered in "name", even when there's nothing close. I think it might be a good idea to set a matching threshold below which the default "model_range" is left.

To Reproduce

For example, when inputing "configuration" : {"cpu": {"name" : "udhhidshhffsdlfnsdjdqosudhfudqhuf"}} the "model_range" completed is "Athlon Gold"

Expected behavior

If the matching rate is lower than the treshold, "model_range" is completed by default or from the archetype.

da-ekchajzer commented 9 months ago

Merged on dev branch. Thanks for your bug report