Skip to content

Fix/normalize scorer inputs#811

Open
EshaniKatiyar wants to merge 2 commits into
komalharshita:mainfrom
EshaniKatiyar:fix/normalize-scorer-inputs
Open

Fix/normalize scorer inputs#811
EshaniKatiyar wants to merge 2 commits into
komalharshita:mainfrom
EshaniKatiyar:fix/normalize-scorer-inputs

Conversation

@EshaniKatiyar

Copy link
Copy Markdown
Contributor

Summary

The interest validation in validate_recommendation_inputs previously 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 separate if/elif checks 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

  • Bug fix — resolves a broken behaviour

What Was Changed

File | Change made -- | -- utils/recommender.py | Split interest validation into separate if/elif checks for missing vs invalid value

How to Test This PR

  1. Clone this branch: git checkout fix/normalize-scorer-inputs
  2. Install dependencies: py -m pip install -r requirements.txt
  3. Run the tests: py tests/test_basic.py

Expected test output:

27 passed, 0 failed out of 27 tests

Test Results

paste output of py tests/test_basic.py here

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: fix/
  • I have run python tests/test_basic.py and all 27 tests pass
  • I have run flake8 . locally and there are no errors
  • I have not introduced any print() or console.log() debug statements
  • Every new function I wrote has a docstring
  • I have not modified files outside the scope of the linked issue

Notes 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.

@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

@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.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working type:performance type:security and removed type:bug Something isn't working gssoc-2026 labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant