fix: resolve pre-existing test failures and improve coverage (#833)#834
Open
Aryanbansal-05 wants to merge 1 commit into
Open
fix: resolve pre-existing test failures and improve coverage (#833)#834Aryanbansal-05 wants to merge 1 commit into
Aryanbansal-05 wants to merge 1 commit into
Conversation
…rshita#833) - Add JSON array support to parse_skills() - Add coverage ratio weighting to score_single_project() - Fix VALID_INTERESTS undefined NameError in validate_recommendation_inputs() - Fix get_recommendations() to return plain list - Add VALID_LEVELS and VALID_TIME_AVAILABILITY to test imports - Fix duplicate project IDs (10, 11, 13) in projects.json
|
@Aryanbansal-05 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 [required]
This PR resolves pre-existing test failures that were blocking the test suite from running cleanly. The fixes address a NameError for VALID_INTERESTS in the recommender, incorrect return type from get_recommendations(), missing coverage ratio weighting in score_single_project(), lack of JSON array support in parse_skills(), missing imports in the test file, and duplicate project IDs in projects.json. No new features are introduced — this is purely a correctness and test coverage fix in line with issue #833.
Closes #833
Type of Change [required]
What Was Changed [required]
| File | Change made |
File | Change made
utils/recommender.py | Added JSON array parsing to parse_skills(); added coverage ratio weighting to score_single_project(); fixed VALID_INTERESTS undefined error; changed get_recommendations() to return a plain list
routes/main_routes.py | No logic change; confirmed compatible with updated get_recommendations() return type
tests/test_basic.py | Added VALID_LEVELS and VALID_TIME_AVAILABILITY to recommender imports; added SCORING_WEIGHTS alias for removed individual weight constants
data/projects.json | Fixed duplicate IDs: API ETL Pipeline → 20, Number Guessing Game → 21, Quiz App → 22
How to Test This PR [required]
git checkout your-branch-namepip install -r requirements.txtpython app.pypython tests/test_basic.pyExpected test output:
72 passed in 0.05s
Test Results [required]
72 passed in 0.05s
Screenshots (if UI change)
Self-Review Checklist [required]
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
The original test suite had 16 failing tests due to bugs in utils/recommender.py and data/projects.json that pre-dated this branch. All fixes made are minimal and targeted — no scoring logic was changed beyond what the existing tests themselves specify as correct behaviour. The flake8 check should be run before final merge as some lines in recommender.py may exceed the line length limit.