Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions src/superannotate/lib/core/usecases/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,18 +738,20 @@ def execute(self):
step_setting = next(
(i for i in project_settings if i.attribute == "WorkflowType"), None
)
if (
self._connections is not None
and step_setting.value == constants.StepsType.BASIC.value
):
raise AppException("Can't update steps type. ")

if step_setting.value == constants.StepsType.BASIC:
if self._connections is None and step_setting.value in [
constants.StepsType.INITIAL.value,
constants.StepsType.BASIC.value,
]:
self.set_basic_steps(annotation_classes)
else:
elif self._connections is not None and step_setting.value in [
constants.StepsType.INITIAL.value,
constants.StepsType.KEYPOINT.value,
]:
self.set_keypoint_steps(
annotation_classes, self._steps, self._connections
)
else:
raise AppException("Can't update steps type.")

return self._response

Expand Down
1 change: 0 additions & 1 deletion tests/integration/annotations/test_upload_annotations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import os
import tempfile
import time
from pathlib import Path

from src.superannotate import AppException
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/items/test_item_context.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import os
import time
from pathlib import Path

from src.superannotate import FileChangedError
Expand Down Expand Up @@ -54,7 +53,7 @@ def _base_test(self, path, item):
assert ic.get_component_value("component_id_1") is None
ic.set_component_value("component_id_1", "value")
with self.assertRaisesRegexp(
FileChangedError, "The file has changed and overwrite is set to False."
FileChangedError, "The file has changed and overwrite is set to False."
):
with sa.item_context(path, item, overwrite=False) as ic:
assert ic.get_component_value("component_id_1") == "value"
Expand Down Expand Up @@ -108,7 +107,7 @@ def setUp(self, *args, **kwargs):
)
team = sa.controller.team
project = sa.controller.get_project(self.PROJECT_NAME)
# time.sleep(10)
# time.sleep(10)
with open(self.EDITOR_TEMPLATE_PATH) as f:
res = sa.controller.service_provider.projects.attach_editor_template(
team, project, template=json.load(f)
Expand Down
1 change: 0 additions & 1 deletion tests/integration/items/test_list_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
import random
import string
import time
from pathlib import Path

from src.superannotate import AppException
Expand Down