Fix/normalize scorer inputs#811
Open
EshaniKatiyar wants to merge 2 commits into
Open
Conversation
|
@EshaniKatiyar is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The interest validation in
validate_recommendation_inputspreviously combined a missing-value check and an invalid-value check into a single condition. This meant both cases — an empty interest and an unrecognised interest — returned the same generic error message, making it harder to debug and giving users unclear feedback. This PR splits it into separateif/elifchecks so each case returns a specific, accurate error message.Related Issue
Closes #
(check the DevPath issues list for the interest validation issue number and fill it in)
Type of Change
What Was Changed
How to Test This PR
git checkout fix/normalize-scorer-inputspy -m pip install -r requirements.txtpy tests/test_basic.pyExpected test output:
Test Results
Self-Review Checklist
fix/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
Split the combined interest validation condition into two separate checks. The first handles missing or empty input, the second handles an unrecognised interest value. No logic change beyond the error message specificity.