@@ -1133,37 +1133,38 @@ def create_project(
11331133 workflow : str = None ,
11341134 form : dict = None ,
11351135 ):
1136- """Create a new project in the team.
1136+ """Creates a new project in the team. For Multimodal projects, you must provide a valid form object,
1137+ which serves as a template determining the layout and behavior of the project's interface.
11371138
1138- :param project_name: the new project's name
1139+ :param project_name: The new project's name.
11391140 :type project_name: str
11401141
1141- :param project_description: the new project's description
1142+ :param project_description: The new project's description.
11421143 :type project_description: str
11431144
1144- :param project_type: the new project type, Vector, Pixel, Video, Document, Tiled, PointCloud, Multimodal.
1145+ :param project_type: The project type. Supported types: ' Vector', ' Pixel', ' Video', ' Document', ' Tiled', ' PointCloud', ' Multimodal' .
11451146 :type project_type: str
11461147
11471148 :param settings: list of settings objects
11481149 :type settings: list of dicts
11491150
1150- :param classes: list of class objects
1151+ :param classes: List of class objects. Not allowed for 'Multimodal' projects.
11511152 :type classes: list of dicts
11521153
1153- :param workflows: Deprecated
1154+ :param workflows: Deprecated. Do not use.
11541155 :type workflows: list of dicts
11551156
1156- :param workflow: the name of the workflow already created within the team, which must match exactly.
1157- If None, the default “System workflow” workflow will be set.
1157+ :param workflow: Name of the workflow already created within the team (must match exactly). If None, the default "System workflow" will be used.
11581158 :type workflow: str
11591159
1160- :param instructions_link: str of instructions URL
1160+ :param instructions_link: URL for project instructions.
11611161 :type instructions_link: str
11621162
1163- :param form: form object that will be used for the MULTIMODAL project.
1163+ :param form: Required for Multimodal projects. Must be a JSON object that conforms to SuperAnnotate’s schema
1164+ for Multimodal form templates, as used in the Multimodal Form Editor.
11641165 :type form: dict
11651166
1166- :return: dict object metadata the new project
1167+ :return: Metadata of the newly created project.
11671168 :rtype: dict
11681169 """
11691170 if workflows is not None :
@@ -1177,9 +1178,14 @@ def create_project(
11771178 else :
11781179 settings = []
11791180 if ProjectType (project_type ) == ProjectType .MULTIMODAL :
1180- logger .error ("Form is required for Multimodal projects." )
1181+ if not form :
1182+ raise AppException (
1183+ "A form object is required when creating a Multimodal project."
1184+ )
11811185 if classes is not None :
1182- raise AppException ("You can't provide classes for Multimodal projects." )
1186+ raise AppException (
1187+ "Classes cannot be provided for Multimodal projects."
1188+ )
11831189 settings .append (SettingEntity (attribute = "TemplateState" , value = 1 ))
11841190 if classes :
11851191 classes = parse_obj_as (List [AnnotationClassEntity ], classes )
0 commit comments