Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Move filtering to backend (part 1) #4283

Conversation

matusdrobuliak66
Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 commented May 30, 2023

What do these changes do?

These changes introduce 3 new query parameters in the list projects api (NOTE: Only the search query parameter is currently added to the OAS and implemented in the backend!)

  • search
  • order_by
  • filters

search

Search is implemented by this PR, it is a full-text search on more columns, currently: project name, description, uuid, and user name.

order_by

filtering

Related issue/s

How to test

Webserver

cd services/web/server/
make install-dev
pytest tests/unit/with_dbs/02/test_projects_handlers__list_search.py

DevOps Checklist

@matusdrobuliak66 matusdrobuliak66 self-assigned this May 30, 2023
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #4283 (45e5157) into master (e3c6b29) will decrease coverage by 6.6%.
The diff coverage is 66.6%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #4283      +/-   ##
=========================================
- Coverage    85.8%   79.2%    -6.6%     
=========================================
  Files         976     399     -577     
  Lines       41989   20754   -21235     
  Branches      965     173     -792     
=========================================
- Hits        36034   16456   -19578     
+ Misses       5734    4249    -1485     
+ Partials      221      49     -172     
Flag Coverage Δ
integrationtests 62.1% <57.8%> (-6.6%) ⬇️
unittests 84.3% <66.6%> (+1.6%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...rc/simcore_service_webserver/projects/_db_utils.py 97.0% <ø> (ø)
...er/src/simcore_service_webserver/projects/utils.py 86.8% <33.3%> (-0.9%) ⬇️
...mcore_service_webserver/projects/_handlers_crud.py 81.9% <50.0%> (-5.6%) ⬇️
...ore_service_webserver/projects/_crud_read_utils.py 97.5% <100.0%> (+1.2%) ⬆️
...erver/src/simcore_service_webserver/projects/db.py 96.6% <100.0%> (+<0.1%) ⬆️

... and 675 files with indirect coverage changes

@matusdrobuliak66 matusdrobuliak66 marked this pull request as ready for review May 30, 2023 15:54
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

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

Great!

  • Note that there is a trick to reuse the pydantic models defined in handlers_crud as query/parameters in api/specs/webserver/scripts
  • Can you please add the references you used (and describes above) in the code as well?

api/specs/webserver/scripts/openapi_projects_crud.py Outdated Show resolved Hide resolved
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

Please check the comments.
Very nice and looking forward to this backend search

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

Please check the comments.
Very nice and looking forward to this backend search

@codeclimate
Copy link

codeclimate bot commented May 31, 2023

Code Climate has analyzed commit 45e5157 and detected 0 issues on this pull request.

View more on Code Climate.

@sonarcloud
Copy link

sonarcloud bot commented May 31, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@matusdrobuliak66 matusdrobuliak66 enabled auto-merge (squash) May 31, 2023 06:34
@matusdrobuliak66 matusdrobuliak66 merged commit fefce5b into ITISFoundation:master May 31, 2023
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants