- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
✨ [Frontend] Create Functions #7653
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
✨ [Frontend] Create Functions #7653
Conversation
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 introduces the first iteration for creating functions in the study pipeline. Key changes include:
- New utility functions in Utils.js for extracting file-pickers, parameters, and probes, and a new boolean check (canCreateFunction) for when a function can be created.
 - A new CreateFunction widget in CreateFunction.js that builds a form for naming and configuring functions based on study data.
 - Updates to related files (Resources.js, ResourceDetails.js, ParameterEditor.js, and service Utils.js) to support and integrate this new functionality.
 
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| osparc/study/Utils.js | Added helper functions (extractFilePickers, extractParameters, extractProbes) and canCreateFunction logic. | 
| osparc/study/CreateFunction.js | Introduced new widget for function creation with form layout and API interactions. | 
| osparc/service/Utils.js | Added utility functions to extract parameter and probe types/values. | 
| osparc/node/ParameterEditor.js | Updated to use the new parameter type extraction. | 
| osparc/data/Resources.js | Added configuration for the "functions" endpoint. | 
| osparc/dashboard/ResourceDetails.js | Integrated the new Create Function page and updated related UI elements. | 
        
          
                services/static-webserver/client/source/class/osparc/study/Utils.js
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/static-webserver/client/source/class/osparc/study/CreateFunction.js
          
            Show resolved
            Hide resolved
        
      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.
😱
        
          
                services/static-webserver/client/source/class/osparc/study/CreateFunction.js
          
            Show resolved
            Hide resolved
        
      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.
∑
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 for the effort @odeimaiz
| 
           @Mergifyio queue  | 
    
          
 ✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 5125753  | 
    
          
 | 
    



What do these changes do?
This PR is the first iteration on the Creation of Functions required by the Meta Modeling case.
In order to be able to create a function out of a study, the study pipeline needs:
if these requirements are met, a Create Function section will appear in the Study Card. From here, one can give a name, description and decide which inputs and outputs will be exposed.
When Create Function is pressed, the frontend will request the backend to create a template from the study, and then it will call "POST" the
/functionsendpoint (coming here).Related issue/s
How to test
Dev-ops