- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
✨ Adds filtering for Service Listing in Catalog's RPC API #7537
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
          
     Merged
      
      
            pcrespov
  merged 20 commits into
  ITISFoundation:master
from
pcrespov:is7532/catalog-rpc-filter
  
      
      
   
  Apr 22, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            20 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      89d7329
              
                ✨ Add ServiceFiltersDB model with service type filtering capabilities
              
              
                pcrespov fe0d0a2
              
                ✨ Implement service type filtering in latest services queries
              
              
                pcrespov 068bfa0
              
                ✨ Add filters parameter to list_latest_catalog_services and list_user…
              
              
                pcrespov 37d4342
              
                ✨ Add ServiceListFilters for service type filtering in paginated serv…
              
              
                pcrespov 11266ef
              
                ✨ Refactor RPC service methods to streamline request handling and imp…
              
              
                pcrespov f2740fa
              
                ✨ Refactor service key prefixes and enhance service type filtering in…
              
              
                pcrespov ba0c3f6
              
                ✨ Add service key prefixes and refactor regex patterns for dynamic an…
              
              
                pcrespov 805253c
              
                ✨ Refactor service filters application and enhance service key prefix…
              
              
                pcrespov 9b3627e
              
                fixes tests
              
              
                pcrespov 4babc5b
              
                ✨ Add service key formats for dynamic, computational, and frontend se…
              
              
                pcrespov 65ad67e
              
                ✨ Refactor service key handling by consolidating key prefixes and reg…
              
              
                pcrespov 281b939
              
                minor
              
              
                pcrespov cabace7
              
                fixes tests
              
              
                pcrespov 778ca3c
              
                fixes tests
              
              
                pcrespov aaa5c67
              
                @sanderegg review: relative imports, doc, private
              
              
                pcrespov 27debde
              
                @GitHK review: types
              
              
                pcrespov a713ee8
              
                @bisgaard-itis review: filters
              
              
                pcrespov 4b30eb5
              
                @sanderegg review: services constants
              
              
                pcrespov 0e0a0af
              
                minor
              
              
                pcrespov 1945d04
              
                fixes mypy
              
              
                pcrespov File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
  
    
      
          
            3 changes: 2 additions & 1 deletion
          
          3 
        
  packages/models-library/src/models_library/function_services_catalog/_key_labels.py
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from .rest_filters import Filters | ||
| 
     | 
||
| __all__: tuple[str, ...] = ("Filters",) | ||
| 
     | 
||
| # nopycln:file | 
        
          
  
    
      
          
            23 changes: 22 additions & 1 deletion
          
          23 
        
  packages/models-library/src/models_library/services_constants.py
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,6 +1,27 @@ | ||
| from types import MappingProxyType | ||
| from typing import Final | ||
| 
     | 
||
| LATEST_INTEGRATION_VERSION: Final[str] = "1.0.0" | ||
| from .services_enums import ServiceType | ||
| 
     | 
||
| LATEST_INTEGRATION_VERSION: Final[str] = "1.0.0" | ||
| 
     | 
||
| ANY_FILETYPE: Final[str] = "data:*/*" | ||
| 
     | 
||
| SERVICE_TYPE_TO_NAME_MAP = MappingProxyType( | ||
| { | ||
| ServiceType.COMPUTATIONAL: "comp", | ||
| ServiceType.DYNAMIC: "dynamic", | ||
| ServiceType.FRONTEND: "frontend", | ||
| } | ||
| ) | ||
| 
     | 
||
| 
     | 
||
| def _create_key_prefix(service_type: ServiceType) -> str: | ||
| return f"simcore/services/{SERVICE_TYPE_TO_NAME_MAP[service_type]}" | ||
| 
     | 
||
| 
     | 
||
| COMPUTATIONAL_SERVICE_KEY_PREFIX: Final[str] = _create_key_prefix( | ||
| ServiceType.COMPUTATIONAL | ||
| ) | ||
| DYNAMIC_SERVICE_KEY_PREFIX: Final[str] = _create_key_prefix(ServiceType.DYNAMIC) | ||
| FRONTEND_SERVICE_KEY_PREFIX: Final[str] = _create_key_prefix(ServiceType.FRONTEND) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.