-
Notifications
You must be signed in to change notification settings - Fork 32
Add search and sort fields to list_functions 🎨 #8218
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
Add search and sort fields to list_functions 🎨 #8218
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8218 +/- ##
==========================================
+ Coverage 86.79% 87.98% +1.19%
==========================================
Files 1910 1486 -424
Lines 73396 60988 -12408
Branches 1301 651 -650
==========================================
- Hits 63704 53661 -10043
+ Misses 9305 7098 -2207
+ Partials 387 229 -158
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@mergify queue |
🟠 Waiting for conditions to match
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds search and sort functionality to the list_functions API, enhancing the function browser capabilities. It enables searching by function name, UUID, and description, as well as sorting by any field.
Key changes:
- Added search parameters for title-specific and multi-column searches
- Implemented ordering by field with ascending/descending direction
- Added filtering by function class (PROJECT or SOLVER)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test_functions_controller_rpc.py |
Added comprehensive tests for pagination, ordering, searching, and filtering functionality |
_functions_service.py |
Updated service layer to accept and process new search/sort parameters |
_functions_repository.py |
Implemented database queries with filtering, searching, and ordering logic |
_functions_rpc.py |
Added new parameters to RPC controller interface |
functions_rpc_interface.py |
Extended RPC interface to support new search and sort parameters |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
services/web/server/src/simcore_service_webserver/functions/_functions_repository.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/functions/test_functions_controller_rpc.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/functions/test_functions_controller_rpc.py
Outdated
Show resolved
Hide resolved
…unctions_repository.py Co-authored-by: Copilot <[email protected]>
…tions_controller_rpc.py Co-authored-by: Copilot <[email protected]>
…tions_controller_rpc.py Co-authored-by: Copilot <[email protected]>
|



What do these changes do?
This is the second stage of changes in the function api for the function browser.
Now one can search by function name and uuid/description/name.
And sort on any field.
For now this is exposed up to the webserver rpc layer. I will later extend it to the public API server, but for now this is enough for @giancarloromeo to expose this to the webserver REST.
Related issue/s
ITISFoundation/osparc-issues#1905
How to test
Add some functions and search / sort in the list_functions call.
Dev-ops
No changes