-
Notifications
You must be signed in to change notification settings - Fork 0
Filter songs that contain TODO from collection #6
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
Co-authored-by: ApsiV11 <47868046+ApsiV11@users.noreply.github.com>
Co-authored-by: ApsiV11 <47868046+ApsiV11@users.noreply.github.com>
test_todo_filter.py
Outdated
| @@ -0,0 +1,122 @@ | |||
| #!/usr/bin/env python3 | |||
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.
Remove this whole file. I don't need tests
Co-authored-by: ApsiV11 <47868046+ApsiV11@users.noreply.github.com>
| import os | ||
|
|
||
| # WHITELIST = ("eino", "") | ||
| WHITELIST = ("",) |
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 file isnt formatted properly
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.
Fixed the formatting issues by consolidating the misplaced imports and running Black formatter. All imports are now properly organized at the top of the file. (415c94a)
…atter Co-authored-by: ApsiV11 <47868046+ApsiV11@users.noreply.github.com>
ApsiV11
left a comment
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.
Nice work!
This PR implements filtering to exclude songs containing "TODO" from the song collection, as there is no need to add incomplete songs to the database.
Changes Made
song_contains_todo()function: Checks all song fields (name, melody, composer, arranger, lyrics, notes) for "TODO" contentsongs.jsonImplementation Details
The filtering is implemented in
extract_songs.pywith minimal code changes:The filter is applied in the main extraction loop:
Testing
The implementation is case-sensitive and safely handles
Nonevalues in song fields.Fixes #5.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.