- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
π¨ add project template type π¨ (ποΈ) #7677
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
      
      
            matusdrobuliak66
  merged 28 commits into
  ITISFoundation:master
from
matusdrobuliak66:add-template-type-to-projects
  
      
      
   
  May 15, 2025 
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            28 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      fdcb5b9
              
                first commit
              
              
                matusdrobuliak66 48ec669
              
                Merge branch 'master' into add-template-type-to-projects
              
              
                matusdrobuliak66 acef022
              
                expose to ProjectGet
              
              
                matusdrobuliak66 705ae27
              
                fix
              
              
                matusdrobuliak66 976c6eb
              
                fix api server
              
              
                matusdrobuliak66 b1e5bfb
              
                fix tests
              
              
                matusdrobuliak66 c94981d
              
                fix tests
              
              
                matusdrobuliak66 e373f4c
              
                fix tests
              
              
                matusdrobuliak66 8530b50
              
                fix tests
              
              
                matusdrobuliak66 8d33e2d
              
                fix tests
              
              
                matusdrobuliak66 569efa5
              
                fix tests
              
              
                matusdrobuliak66 2edcdda
              
                fix
              
              
                matusdrobuliak66 a837594
              
                fix tests
              
              
                matusdrobuliak66 9a7978b
              
                fix tests
              
              
                matusdrobuliak66 8452630
              
                fix tests
              
              
                matusdrobuliak66 a1d8d9a
              
                fix tests
              
              
                matusdrobuliak66 ab569a6
              
                Merge branch 'master' into add-template-type-to-projects
              
              
                matusdrobuliak66 a3e9745
              
                fix tests
              
              
                matusdrobuliak66 51e5e11
              
                Merge branch 'add-template-type-to-projects' of github.com:matusdrobuβ¦
              
              
                matusdrobuliak66 f2dd7db
              
                review @GitHK
              
              
                matusdrobuliak66 5b4ff52
              
                Merge branch 'master' into add-template-type-to-projects
              
              
                matusdrobuliak66 4a42384
              
                services/webserver api version: 0.64.0 β 0.65.0
              
              
                matusdrobuliak66 ab23499
              
                Merge branch 'add-template-type-to-projects' of github.com:matusdrobuβ¦
              
              
                matusdrobuliak66 a2a0135
              
                Merge branch 'master' into add-template-type-to-projects
              
              
                matusdrobuliak66 cd6277a
              
                fix
              
              
                matusdrobuliak66 428799f
              
                Merge branch 'add-template-type-to-projects' of github.com:matusdrobuβ¦
              
              
                matusdrobuliak66 0cfab55
              
                fix
              
              
                matusdrobuliak66 1729ed5
              
                fix
              
              
                matusdrobuliak66 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
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -26,7 +26,14 @@ | |
| from ..emails import LowerCaseEmailStr | ||
| from ..folders import FolderID | ||
| from ..groups import GroupID | ||
| from ..projects import ClassifierID, DateTimeStr, NodesDict, ProjectID | ||
| from ..projects import ( | ||
| ClassifierID, | ||
| DateTimeStr, | ||
| NodesDict, | ||
| ProjectID, | ||
| ProjectTemplateType, | ||
| ProjectType, | ||
| ) | ||
| from ..projects_access import AccessRights, GroupIDStr | ||
| from ..projects_state import ProjectState | ||
| from ..utils._original_fastapi_encoders import jsonable_encoder | ||
| 
          
            
          
           | 
    @@ -106,6 +113,9 @@ class ProjectGet(OutputSchema): | |
| description: str | ||
| thumbnail: HttpUrl | Literal[""] | ||
| 
     | 
||
| type: ProjectType | ||
| template_type: ProjectTemplateType | None | ||
| 
     | 
||
| workbench: NodesDict | ||
| 
     | 
||
| prj_owner: LowerCaseEmailStr | ||
| 
          
            
          
           | 
    @@ -153,6 +163,8 @@ def _update_json_schema_extra(schema: JsonDict) -> None: | |
| "name": "My Project", | ||
| "description": "This is a sample project", | ||
| "thumbnail": "https://example.com/thumbnail.png", | ||
| "type": "STANDARD", | ||
| "template_type": None, | ||
| "workbench": {}, | ||
| "prj_owner": "[email protected]", | ||
| "access_rights": {}, | ||
| 
          
            
          
           | 
    ||
  
    
      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
    
  
  
    
              
        
          
  
    
      
          
            44 changes: 44 additions & 0 deletions
          
          44 
        
  ...simcore_postgres_database/migration/versions/b39f2dc87ccd_add_templatetype_to_projects.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 | 
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| """add templateType to projects | ||
| 
     | 
||
| Revision ID: b39f2dc87ccd | ||
| Revises: fc1701bb7e93 | ||
| Create Date: 2025-05-14 11:59:27.033449+00:00 | ||
| 
     | 
||
| """ | ||
| 
     | 
||
| import sqlalchemy as sa | ||
| from alembic import op | ||
| 
     | 
||
| # revision identifiers, used by Alembic. | ||
| revision = "b39f2dc87ccd" | ||
| down_revision = "fc1701bb7e93" | ||
| branch_labels = None | ||
| depends_on = None | ||
| 
     | 
||
| 
     | 
||
| def upgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| # Create enum type first | ||
| project_template_type = sa.Enum( | ||
| "TEMPLATE", "TUTORIAL", "HYPERTOOL", name="projecttemplatetype" | ||
| ) | ||
| project_template_type.create(op.get_bind()) | ||
| 
     | 
||
| op.add_column( | ||
| "projects", | ||
| sa.Column( | ||
| "template_type", | ||
| project_template_type, | ||
| nullable=True, | ||
| default=None, | ||
| ), | ||
| ) | ||
| # ### end Alembic commands ### | ||
| op.execute("UPDATE projects SET template_type='TEMPLATE' WHERE type='TEMPLATE'") | ||
| 
     | 
||
| 
     | 
||
| def downgrade(): | ||
| # ### commands auto generated by Alembic - please adjust! ### | ||
| op.drop_column("projects", "template_type") | ||
| # ### end Alembic commands ### | ||
| sa.Enum(name="projecttemplatetype").drop(op.get_bind()) | 
  
    
      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.