mentorship-backend icon indicating copy to clipboard operation
mentorship-backend copied to clipboard

feat: add feature to the List Users API to filter users by skill

Open battuAshita opened this issue 3 years ago • 9 comments

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

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 avatar May 10 '21 11:05 battuAshita

@battuAshita one last file and it will pass

vj-codes avatar May 10 '21 12:05 vj-codes

Codecov Report

Merging #1097 (7f158f9) into develop (8924616) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           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%> (ø)

codecov[bot] avatar May 10 '21 13:05 codecov[bot]

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 :)

battuAshita avatar May 18 '21 16:05 battuAshita

Done :)

battuAshita avatar May 29 '21 07:05 battuAshita

There are some conflicts @battuAshita . Please solve them

devkapilbansal avatar Sep 09 '21 08:09 devkapilbansal

There are some conflicts @battuAshita . Please solve them

Okay, sure. Will get back :)

battuAshita avatar Sep 09 '21 09:09 battuAshita

There are some conflicts @battuAshita . Please solve them

Done.

battuAshita avatar Sep 09 '21 09:09 battuAshita

Made the necessary changes. Please review them.

battuAshita avatar Sep 10 '21 17:09 battuAshita

Done :)

battuAshita avatar Oct 09 '21 17:10 battuAshita