Skip to content

Commit b1e5bfb

Browse files
fix tests
1 parent 976c6eb commit b1e5bfb

File tree

8 files changed

+44
-7
lines changed

8 files changed

+44
-7
lines changed

packages/models-library/src/models_library/projects.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ class ProjectAtDB(BaseProjectModel):
115115
project_type: Annotated[
116116
ProjectType, Field(alias="type", description="The project type")
117117
]
118+
template_type: Annotated[
119+
ProjectTemplateType | None,
120+
Field(
121+
# alias="template_type",
122+
examples=["TEMPLATE", "TUTORIAL", "HYPERTOOL"],
123+
),
124+
]
118125

119126
prj_owner: Annotated[int | None, Field(description="The project owner id")]
120127

@@ -172,6 +179,22 @@ class Project(BaseProjectModel):
172179
# Project state (SEE projects_state.py)
173180
state: ProjectState | None = None
174181

182+
# Type of project
183+
type: Annotated[
184+
ProjectType,
185+
Field(
186+
description="The project type",
187+
examples=["TEMPLATE", "STANDARD"],
188+
),
189+
]
190+
template_type: Annotated[
191+
ProjectTemplateType | None,
192+
Field(
193+
alias="templateType",
194+
examples=["TEMPLATE", "TUTORIAL", "HYPERTOOL", None],
195+
),
196+
]
197+
175198
# UI front-end fields (SEE projects_ui.py)
176199
ui: dict[str, Any] | None = None
177200
dev: dict[str, Any] | None = None

services/web/server/tests/data/fake-project.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,7 @@
7171
"ui": {},
7272
"quality": {},
7373
"dev": {},
74-
"workspaceId": null
74+
"workspaceId": null,
75+
"type": "STANDARD",
76+
"templateType": null
7577
}

services/web/server/tests/data/fake-template-projects.hack08.notebooks.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@
6262
}
6363
}
6464
},
65-
"workspaceId": null
65+
"workspaceId": null,
66+
"type": "TEMPLATE",
67+
"templateType": "TEMPLATE"
6668
}

services/web/server/tests/data/fake-template-projects.isan.2dplot.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@
4848
}
4949
}
5050
},
51-
"workspaceId": null
51+
"workspaceId": null,
52+
"type": "TEMPLATE",
53+
"templateType": "TEMPLATE"
5254
}

services/web/server/tests/data/fake-template-projects.isan.matward.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@
2323
}
2424
}
2525
},
26-
"workspaceId": null
26+
"workspaceId": null,
27+
"type": "TEMPLATE",
28+
"templateType": "TEMPLATE"
2729
}

services/web/server/tests/data/fake-template-projects.isan.paraview.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,7 @@
7171
}
7272
}
7373
},
74-
"workspaceId": null
74+
"workspaceId": null,
75+
"type": "TEMPLATE",
76+
"templateType": "TEMPLATE"
7577
}

services/web/server/tests/data/fake-template-projects.isan.ucdavis.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@
8484
}
8585
}
8686
},
87-
"workspaceId": null
87+
"workspaceId": null,
88+
"type": "TEMPLATE",
89+
"templateType": "TEMPLATE"
8890
}

services/web/server/tests/data/fake-template-projects.sleepers.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,7 @@
113113
}
114114
}
115115
},
116-
"workspaceId": null
116+
"workspaceId": null,
117+
"type": "TEMPLATE",
118+
"templateType": "TEMPLATE"
117119
}

0 commit comments

Comments
 (0)