-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix finding cached files for flavor in load() #471
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThe PR fixes a bug in the cache file lookup logic when loading media files with a different format than the original. The implementation introduces a new helper function Class diagram for updated cache file lookup logicclassDiagram
class Load {
+_missing_files(files, files_type, db_root, flavor, verbose)
}
class Load {
+is_cached(file) bool
}
Load --|> is_cached : uses
note for is_cached "Helper function to check if a file is cached, considering format conversion for media files."
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @hagenw - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Closes #324
Ensures that media files are found in cache when using
audb.load(..., format=format)
andformat
is different from the original format of the media files. This is achieved by replacing the file extension of the original file (original file names are given by dependency table) by the givenformat
when checking if the file exists in the cache. The pull request also adds a test for the expected behavior, which is failing for the currentmain
branch./cc @ureichel