-
Notifications
You must be signed in to change notification settings - Fork 32
✨ public-api: list solvers filtered by service_key and version_display patterns
#7695
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
✨ public-api: list solvers filtered by service_key and version_display patterns
#7695
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7695 +/- ##
==========================================
+ Coverage 87.56% 87.60% +0.04%
==========================================
Files 1812 1807 -5
Lines 70372 70224 -148
Branches 1144 1144
==========================================
- Hits 61619 61518 -101
+ Misses 8441 8394 -47
Partials 312 312
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
0f8bfb2 to
1370bc2
Compare
1370bc2 to
3d2fe5c
Compare
public-api: list solvers filtered by service_key and version_display patterns
49013ea to
cfa0e2e
Compare
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 enhances the public API for listing solvers by adding pattern-based filtering on solver IDs and version display. It also refactors related modules, updates Pydantic models, introduces new FastAPI dependencies, and expands test coverage to validate the filters.
- Add
service_key_patternandversion_display_patternto DB filters and RPC/listing logic - Introduce
SolversListFiltersschema andget_solvers_filtersdependency in the API server - Refactor module names (e.g.,
solvers_jobs_getters→solvers_jobs_read) and update import paths - Extend pytest fixtures and mocks to support version display in catalog data
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| services/catalog/.../models/services_db.py | Renamed filter and access-rights classes; added pattern fields to ServiceDBFilters. |
| services/catalog/.../api/rpc/_services.py | Replaced custom adapter function with TypeAdapter calls for ServiceDBFilters. |
| services/catalog/.../_service_solvers.py | Updated latest_solvers signature to accept pagination and filter parameters; added filtering. |
| packages/pytest-simcore/.../helpers/catalog_services.py | Added version_display override to mock factory signature. |
| packages/pytest-simcore/.../helpers/catalog_rpc_server.py | Implemented fnmatch-based filtering in RPC mock based on new DB filters. |
| services/api-server/.../models/schemas/solvers.py | Migrated PortKindStr to TypeAlias; left a commented divider. |
| services/api-server/.../api/routes/solvers.py | Added SolversListFilters dependency and wired filters into latest_solvers calls. |
Comments suppressed due to low confidence (5)
services/catalog/src/simcore_service_catalog/_service_solvers.py:164
- The docstring refers to
offsetandlimit, but the method signature usespagination_offsetandpagination_limit. Update the parameter names in the docstring for consistency.
offset: Pagination offset
packages/pytest-simcore/src/pytest_simcore/helpers/catalog_services.py:24
- The function signature now includes
version_display, but the docstring above does not mention this new parameter; please update the docstring to documentversion_display.
deprecated: datetime | None = None, # DB column
services/catalog/src/simcore_service_catalog/models/services_db.py:251
- [nitpick] The class name
ServiceDBFiltersis inconsistent with other filter names likeSolversListFiltersand the originalServiceFiltersDB. Consider aligning the name with the existing pattern (e.g.,ServiceFiltersDB).
class ServiceDBFilters(Filters):
packages/pytest-simcore/src/pytest_simcore/helpers/catalog_rpc_server.py:67
- [nitpick] The loop variable
srcis not descriptive; consider renaming it toserviceoritemto improve readability.
for src in services_list:
services/api-server/src/simcore_service_api_server/models/schemas/solvers.py:29
- [nitpick] This commented divider is no longer needed and can be removed to keep the schema file clean.
# SOLVER ----------
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.
👍 thanks
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.
thanks!
services/api-server/src/simcore_service_api_server/models/schemas/solvers_filters.py
Show resolved
Hide resolved
…DB and update SQL query logic
…date related tests for filtering
…eServiceDataCallable
…d update descriptions in SolversListFilters
cfa0e2e to
941817c
Compare
|
@mergify queue |
🟠 Waiting for conditions to match
|
|

What do these changes do?
This pull request introduces new filtering capabilities for listing solvers in the public API .The changes include adding support for filtering by key patterns and version display patterns, updating API endpoints and dependencies to reflect these new features, and renaming modules for better semantics.
0.8(current version is0.7.1New Filtering Features
ServiceListFiltersandSolversListFiltersnow support filtering byservice_key_patternandversion_display_pattern, enabling more granular queries for services and solvers (services.py,solvers_filters.py). [1] [2]list_services_paginatedandlatest_solversmethods to apply these filters when provided, usingfnmatchfor pattern matching (catalog_rpc_server.py,_service_solvers.py). [1] [2]API Enhancements
get_solvers_filtersto parse and validate query parameters for solver filters (models_schemas_solvers_filters.py).list_solversandlist_solvers_releasesendpoints (solvers.py). [1] [2]test_api_routers_solvers.py).Refactoring and Renaming
solvers_jobs_getters.pytosolvers_jobs_read.pyfor better semantic clarity and updated all references accordingly (root.py,function_jobs_routes.py). [1] [2]TypeAdapterin the catalog service's RPC API (_services.py). [1] [2]Minor Adjustments
version_displayfield in the catalog's mock data generator (catalog_services.py).TypeAliasforPortKindStrin the solvers schema for improved type clarity (solvers.py).Related issue/s
How to test
simcore_service_catalog's repository layer against real database.Dev-ops
None