feat: add skill gap analyzer to show skills that unlock more projects (Issue #138)#645
Open
pragathip005 wants to merge 1 commit into
Open
feat: add skill gap analyzer to show skills that unlock more projects (Issue #138)#645pragathip005 wants to merge 1 commit into
pragathip005 wants to merge 1 commit into
Conversation
…komalharshita#138) - Add get_skill_gap() and _count_skill_matched_projects() to recommender.py - Add POST /api/skill-gap route to main_routes.py - Render 'Want More Matches?' section below recommendations - Fix broken form-submit error handler (duplicate nested fetch in catch) - Hide skill gap section when Clear Filters is clicked Closes komalharshita#138
|
@pragathip005 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
This PR implements the Skill Gap Analyzer feature (Issue #138). After a user submits the recommendation form and results load, a "Want More Matches?" section appears below the project cards. It analyses the user's current skills against the full project dataset and shows up to 8 skills they could learn to unlock more matches.
Two types of suggestions are shown: project-based gaps (skills that directly unlock specific projects in the database, shown as expandable rows with clickable project links) and trending skills (curated by interest area for users who already have broad skills, shown as a combined chip card labeled "Trending in [Interest]"). Both update dynamically on every search based on the user's current skill set.
Related Issue
Closes #138
Type of Change
What Was Changed
utils/recommender.py_get_skill_matched_projects(),_project_based_gaps(),get_skill_gap()with greedy deduplication; addedTRENDING_SKILLS_BY_INTERESTcurated fallback per interest arearoutes/main_routes.pyPOST /api/skill-gaproute; updated importstatic/script.jsfetchSkillGap()andrenderSkillGap(); fixed missing});closingform.addEventListenerand duplicateifblock inrenderResultsthat left the function unclosed (caused JS syntax error blocking all interactivity); fixed#github-modal-overlayblocking chip clickstemplates/index.html#skill-gap-sectionHTML block; fixed#github-modal-overlaymissingdisplay:nonestatic/style.cssHow to Test This PR
pip install -r requirements.txt && python app.pyhttp://127.0.0.1:5000html, select Beginner / Web / Low → Submit. Scroll to "Want More Matches?" — expandable rows appear. Click one to see specific project names as links.pytest tests/Test Results
tests/test_basic.py::test_projects_json_loads PASSED
tests/test_basic.py::test_each_project_has_required_fields PASSED
tests/test_basic.py::test_find_project_by_id_found PASSED
tests/test_basic.py::test_find_project_by_id_missing PASSED
tests/test_basic.py::test_parse_skills_basic PASSED
tests/test_basic.py::test_parse_skills_empty_string PASSED
tests/test_basic.py::test_parse_skills_single_entry PASSED
tests/test_basic.py::test_score_single_project_full_match PASSED
tests/test_basic.py::test_score_single_project_no_match PASSED
tests/test_basic.py::test_score_single_project_alias_matching PASSED
tests/test_basic.py::test_get_recommendations_returns_results PASSED
tests/test_basic.py::test_get_recommendations_max_three PASSED
tests/test_basic.py::test_get_recommendations_no_match_returns_empty PASSED
tests/test_basic.py::test_get_recommendations_result_format PASSED
tests/test_basic.py::test_validate_all_valid PASSED
tests/test_basic.py::test_validate_missing_skills PASSED
tests/test_basic.py::test_validate_missing_level PASSED
tests/test_basic.py::test_validate_missing_interest PASSED
tests/test_basic.py::test_validate_missing_time PASSED
tests/test_basic.py::test_validate_all_missing PASSED
tests/test_basic.py::test_home_route PASSED
tests/test_basic.py::test_security_headers_present PASSED
tests/test_basic.py::test_recommend_api_valid PASSED
tests/test_basic.py::test_recommend_api_interest_not_available PASSED
tests/test_basic.py::test_recommend_api_missing_field PASSED
tests/test_basic.py::test_recommend_api_empty_body PASSED
tests/test_basic.py::test_project_detail_found PASSED
tests/test_basic.py::test_project_detail_not_found PASSED
tests/test_basic.py::test_internal_server_error_page PASSED
tests/test_basic.py::test_view_code_found PASSED
tests/test_basic.py::test_download_code_found PASSED
tests/test_basic.py::test_health_check PASSED
tests/test_basic.py::test_scoring_weights_has_all_keys PASSED
tests/test_basic.py::test_sitemap_returns_200 PASSED
tests/test_basic.py::test_sitemap_content_type PASSED
tests/test_basic.py::test_sitemap_contains_homepage PASSED
tests/test_basic.py::test_sitemap_contains_all_project_ids PASSED
tests/test_basic.py::test_robots_txt_returns_200 PASSED
tests/test_basic.py::test_robots_txt_references_sitemap PASSED
tests/test_basic.py::test_project_links_have_noopener PASSED
============================== 40 passed in 0.17s ==============================
Screenshots
Self-Review Checklist
feat/skill-gap-analyzer-138pytest tests/and all 40 tests passprint()orconsole.log()debug statementsNotes for Reviewer
The JS bug fixes in
script.js(missing});forform.addEventListener, unclosedrenderResultsdue to a duplicate nestedifblock, and the#github-modal-overlay`d