Skip to content
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

Rename visa_rb key to rb #645

Merged
merged 3 commits into from
Oct 27, 2024
Merged

Conversation

Casper-Guo
Copy link
Contributor

Fixes #644

I am choosing to change the team colors dictionary rather than the team translate dictionary because visa rb is not how the team is represented in the data

@theOehrly
Copy link
Owner

I'll try to look at this soon. I vaguely remember that there was a reason why RB isn't just "rb" in the data. Not sure if this is still a problem or if I even remember correctly. I need to dig around and check.

@Casper-Guo
Copy link
Contributor Author

I think I figured out the reason why.

If the key in the LEGACY_TEAM_COLOR dictionary is rb and the user input is visa rb, then there is no exact or partial match. This will cause the user input to be redirected to the fuzzy matching procedure. The closest match turns out to be sauber but the match ratio is below the minimum threshold. That causes a KeyError to be thrown

@Casper-Guo
Copy link
Contributor Author

I can address the test failure later if these changes look more agreeable to you

@theOehrly theOehrly self-requested a review October 27, 2024 11:01
@theOehrly
Copy link
Owner

I think everything is good now?

@theOehrly theOehrly merged commit 958576e into theOehrly:master Oct 27, 2024
9 checks passed
theOehrly pushed a commit that referenced this pull request Oct 27, 2024
* Fix internal team name mismatch for "visa rb"

* Reorder fuzzy matching logic

* Add regression test for team_color

* fix test failure caused by using incorrect team colors reference

---------

Co-authored-by: theOehrly <[email protected]>
(cherry picked from commit 958576e)
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.

[BUG] Legacy plotting cannot handle RB
2 participants