mentorship-backend
mentorship-backend copied to clipboard
feat: add feature to the List Users API to filter users by skill
Description
Added a new feature to filter both users and verified users based on their skill. The 'app/api/dao/user.py' and the 'app/api/resources/user.py' files have been updated.
Fixes #759
Type of Change:
- Code
Code/Quality Assurance Only
- New feature (non-breaking change which adds functionality pre-approved by mentors)
How Has This Been Tested?
I have included a test_dao_filter_by_skill.py file to 'tests/users'.
Both the test cases that I have written have been passed successfully.
Checklist:
- [x] My PR follows the style guidelines of this project
- [x] I have performed a self-review of my own code or materials
- [x] Updated the Swagger UI documentation for the List Users API
Code/Quality Assurance Only
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
@battuAshita one last file and it will pass
Codecov Report
Merging #1097 (7f158f9) into develop (8924616) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## develop #1097 +/- ##
========================================
Coverage 94.94% 94.95%
========================================
Files 38 38
Lines 2058 2061 +3
========================================
+ Hits 1954 1957 +3
Misses 104 104
Impacted Files | Coverage Δ | |
---|---|---|
app/api/dao/user.py | 100.00% <100.00%> (ø) |
|
app/api/resources/user.py | 90.36% <100.00%> (ø) |
|
app/database/models/user.py | 98.57% <100.00%> (ø) |
I have made changes to the code such that we will be able to filter based on the skill even when they are not exactly matched. Like if we search for "Creative", we will be able to get the users with skill "Creativity". Please review this change :)
Done :)
There are some conflicts @battuAshita . Please solve them
There are some conflicts @battuAshita . Please solve them
Okay, sure. Will get back :)
There are some conflicts @battuAshita . Please solve them
Done.
Made the necessary changes. Please review them.
Done :)