Skip to content

Use best-match algo for more providers #2231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 9, 2025
Merged

Use best-match algo for more providers #2231

merged 8 commits into from
Aug 9, 2025

Conversation

gantoine
Copy link
Member

@gantoine gantoine commented Aug 7, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.

This PR implements a best-match algorithm using Jaro-Winkler similarity across multiple metadata providers to improve game matching accuracy. The change replaces exact string matching with fuzzy matching to better handle variations in game titles.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Copy link

trunk-io bot commented Aug 7, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

Copy link

github-actions bot commented Aug 7, 2025

Test Results

548 tests  ±0   547 ✅ ±0   57s ⏱️ -2s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 29ddcb4. ± Comparison against base commit b160909.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Aug 7, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
8738 6163 71% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/handler/metadata/base_hander.py 99% 🟢
backend/handler/metadata/hasheous_handler.py 41% 🟢
backend/handler/metadata/igdb_handler.py 69% 🟢
backend/handler/metadata/moby_handler.py 42% 🟢
backend/handler/metadata/sgdb_handler.py 46% 🟢
backend/handler/metadata/ss_handler.py 33% 🟢
backend/utils/archive_7zip.py 20% 🟢
TOTAL 50% 🟢

updated for commit: 29ddcb4 by action🐍

@gantoine gantoine requested a review from Copilot August 8, 2025 19:15
Copilot

This comment was marked as outdated.

@gantoine gantoine requested a review from Copilot August 8, 2025 20:59
Copilot

This comment was marked as outdated.

@gantoine gantoine marked this pull request as ready for review August 9, 2025 01:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a best-match algorithm using Jaro-Winkler similarity to improve game matching accuracy across multiple metadata providers. It replaces exact string matching with fuzzy matching to better handle variations in game titles.

  • Replaced exact string matching with Jaro-Winkler fuzzy matching across metadata handlers
  • Simplified search term splitting logic using regex patterns
  • Added conditional score display in the frontend to handle "None" values

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pyproject.toml Added strsimpy dependency for Jaro-Winkler string similarity
frontend/src/components/Details/Title.vue Added null check for moby_score to prevent displaying "None"
backend/handler/metadata/base_hander.py Added find_best_match method using Jaro-Winkler algorithm
backend/handler/metadata/ss_handler.py Replaced exact matching with best-match algorithm and simplified search term splitting
backend/handler/metadata/sgdb_handler.py Removed custom similarity calculations, using new base class method
backend/handler/metadata/moby_handler.py Replaced exact matching with best-match algorithm and simplified search term splitting
backend/handler/metadata/igdb_handler.py Replaced exact matching with best-match algorithm

@gantoine gantoine merged commit e164b85 into master Aug 9, 2025
11 checks passed
@gantoine gantoine deleted the find-best-match branch August 9, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant