-
-
Notifications
You must be signed in to change notification settings - Fork 601
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
Make ‘required words’ that start with a '+' an absolute requirement #8791
base: develop
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe changes involve updates to the user interface and functionality of the SickChill application. Specifically, modifications were made to Mako template files to clarify search requirements regarding words prefixed with a plus sign. Additionally, a new function was introduced in the Python code to validate the presence of required words in show names, enhancing the filtering process for releases. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant Validator
participant Filter
User->>UI: Enter search terms
UI->>Validator: Validate terms
Validator->>Filter: Check required words
Filter-->>Validator: Validation result
Validator-->>UI: Display results
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
Actions performedReview triggered.
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- sickchill/gui/slick/views/config_search.mako (1 hunks)
- sickchill/gui/slick/views/editShow.mako (1 hunks)
- sickchill/oldbeard/show_name_helpers.py (3 hunks)
Additional comments not posted (5)
sickchill/oldbeard/show_name_helpers.py (3)
38-57
: LGTM!The new
contains_all_words
function is well-implemented and serves the purpose of checking for the presence of all specified words in a name. The regular expression ensures that partial matches do not falsely satisfy the condition. The function handles both string and list input formats, providing flexibility to the caller.
85-86
: LGTM!The new
remove_plus_sign
helper function is a simple utility that cleans up the list of words by removing leading '+' characters. It is used in multiple places to ensure consistency in how required words are processed.
92-94
: LGTM!The changes in the
filter_bad_releases
function enhance the filtering process by adding a stricter requirement for certain words, improving the overall functionality of the release filtering mechanism. The use of theremove_plus_sign
function ensures consistency in how required words are processed. The logging statements provide useful information when a release is ignored due to missing required words.Also applies to: 105-116
sickchill/gui/slick/views/editShow.mako (1)
373-373
: LGTM!The new label clearly communicates the requirement for search terms starting with a plus sign to always be present. This improves the user experience by providing explicit guidance on the search functionality.
sickchill/gui/slick/views/config_search.mako (1)
226-226
: LGTM!The updated label text clarifies that words starting with a plus sign must always be present in the search results. This improves the user experience by explicitly communicating the expected behavior.
Please also consider in the future giving your edits a relevant |
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Push... |
This issue has now been unmarked as "stale" |
Sorry I have been away, I'll try to get this tested manually soon. |
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Proposed changes in this pull request:
This PR is based on my rejected PR #8786. However, this PR does not change the current behaviour of 'required words', but introduces the new possibility to add required words with a leading plus sign (+). Words with a leading plus sign are an absolute requirement and search results that do not contain all required words with a leading plus sign will be ignored. The log contains a message indicating the first required word which was missing if the result was ignored.
If no required word has a leading plus sign, the ‘required words’ function behaves as usual (at least one of the words must be present), and therefore this change is not disruptive. Rather, it extends the ‘required words’ functionality and makes it possible to define words that must always and cumulatively be present.
Summary by CodeRabbit
New Features
Bug Fixes