-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed issue with excel matching #33
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
Conversation
Summary of ChangesHello @lucie271, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a subtle bug in the video processing workflow that caused an incorrect association between video files and their corresponding annotations. The problem arose when video filenames contained dots other than the one preceding the file extension, leading to premature truncation of the filename during matching. The updated logic now accurately extracts the base filename by splitting only on the last dot, ensuring reliable data correlation. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly addresses an issue with matching video filenames that contain dots by using rsplit instead of split. This is a good, robust fix. My review includes one comment pointing out that the same bug pattern exists elsewhere in the file and should also be updated to ensure the issue is fully resolved.
| ] | ||
| mask = ( | ||
| participant_excel["FileName"].str.split(".").str[0] | ||
| participant_excel["FileName"].str.rsplit(".", n=1).str[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great fix for handling filenames with multiple dots. However, the same issue appears to exist in another part of the file. The determine_session_from_excel function also uses participant_excel["FileName"].str.split(".").str[0] on line 302. To ensure consistency and fully resolve the bug, you should apply this rsplit logic there as well.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #33 +/- ##
=======================================
Coverage 80.03% 80.03%
=======================================
Files 5 5
Lines 1052 1052
=======================================
Hits 842 842
Misses 210 210 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
looks good. do you want me to merge it or are there more changes in plan? @lucie271 |
Fixed issue with excel matching
This PR is to adress a tiny issue with the matching of the video being processed with its annotations from the csv file. Indeed, many video files have originally dots in their filename (like "28.03.2025.mp4"for example), so I needed to go from
to