Skip to content

Fix invalid time_availability handling in recommender.py#669

Closed
mauliphad76 wants to merge 1 commit into
komalharshita:mainfrom
mauliphad76:main
Closed

Fix invalid time_availability handling in recommender.py#669
mauliphad76 wants to merge 1 commit into
komalharshita:mainfrom
mauliphad76:main

Conversation

@mauliphad76
Copy link
Copy Markdown

Summary [required]

Related Issue [required]

Closes #

Type of Change [required]

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Data — adds new projects to data/projects.json
  • Documentation — updates docs, README, or code comments only
  • Style — CSS or visual changes only, no logic change
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed [required]

File Change made
utils/recommender.py Added clear_cache() function
tests/test_basic.py Added test for cache invalidation

How to Test This PR [required]

  1. Clone this branch: git checkout your-branch-name
  2. Install dependencies: pip install -r requirements.txt
  3. Run the app: python app.py
  4. Open http://127.0.0.1:5000 and...
  5. Run the tests: python tests/test_basic.py

Expected test output:

27 passed, 0 failed out of 27 tests

Test Results [required]

paste output here

Screenshots (if UI change)

Before After
screenshot screenshot

Self-Review Checklist [required]

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: feat/, fix/, docs/, data/, style/, test/
  • 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
  • If I changed the UI, I tested it at 375px (mobile) and 1280px (desktop)
  • If I added a project to the dataset, it has all required JSON fields

Notes for Reviewer

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

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

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

@komalharshita
Copy link
Copy Markdown
Owner

Thank you for the contribution.

I reviewed the changes and appreciate the effort to make recommendation scoring more resilient to invalid inputs.

However, this PR handles invalid values by silently returning a score of 0 instead of addressing validation at the input layer. In addition, the change introduces modifications to level and interest matching behavior that are outside the scope of the reported issue.

The PR also does not include regression tests to verify the new behavior, which makes it difficult to validate the fix and prevent future regressions.

Since this change overlaps with other validation-related improvements and lacks accompanying test coverage, I’m closing this pull request.

Thank you for contributing to DevPath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:invalid This doesn't seem right gssoc-2026

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants