Skip to content

Commit 207150e

Browse files
authored
Merge pull request #426 from superannotateai/friday_search_items
Code fix
2 parents fd4945d + 53adb73 commit 207150e

34 files changed

+1038
-1263
lines changed

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
minversion = 3.0
33
log_cli=true
44
python_files = test_*.py
5-
;addopts = -n auto --dist=loadscope
5+
addopts = -n auto --dist=loadscope

src/superannotate/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
attach_document_urls_to_project,
2626
)
2727
from superannotate.lib.app.interface.sdk_interface import attach_image_urls_to_project
28-
from superannotate.lib.app.interface.sdk_interface import attach_items_from_integrated_storage
28+
from superannotate.lib.app.interface.sdk_interface import (
29+
attach_items_from_integrated_storage,
30+
)
2931
from superannotate.lib.app.interface.sdk_interface import attach_video_urls_to_project
3032
from superannotate.lib.app.interface.sdk_interface import benchmark
3133
from superannotate.lib.app.interface.sdk_interface import clone_project
@@ -105,9 +107,7 @@
105107
from superannotate.lib.app.interface.sdk_interface import (
106108
upload_preannotations_from_folder_to_project,
107109
)
108-
from superannotate.lib.app.interface.sdk_interface import (
109-
upload_priority_scores,
110-
)
110+
from superannotate.lib.app.interface.sdk_interface import upload_priority_scores
111111
from superannotate.lib.app.interface.sdk_interface import upload_video_to_project
112112
from superannotate.lib.app.interface.sdk_interface import (
113113
upload_videos_from_folder_to_project,
@@ -159,6 +159,7 @@
159159
"clone_project",
160160
"share_project",
161161
"delete_project",
162+
"rename_project",
162163
"upload_priority_scores",
163164
# Images Section
164165
"search_images",
@@ -215,7 +216,6 @@
215216
"run_prediction",
216217
"search_models",
217218
"download_model",
218-
"rename_project",
219219
"set_image_annotation_status",
220220
"benchmark",
221221
"consensus",

src/superannotate/lib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88

99
def get_default_controller():
1010
from lib.infrastructure.controller import Controller
11+
1112
return Controller.get_default()

src/superannotate/lib/app/annotation_helpers.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,18 @@ def add_annotation_comment_to_json(
5656
):
5757
"""Add a comment to SuperAnnotate format annotation JSON
5858
59-
6059
:param annotation_json: annotations in SuperAnnotate format JSON or filepath to JSON
6160
:type annotation_json: dict or Pathlike (str or Path)
61+
6262
:param comment_text: comment text
6363
:type comment_text: str
64+
6465
:param comment_coords: [x, y] coords
6566
:type comment_coords: list
67+
6668
:param comment_author: comment author email
6769
:type comment_author: str
70+
6871
:param resolved: comment resolve status
6972
:type resolved: bool
7073
"""
@@ -106,12 +109,16 @@ def add_annotation_bbox_to_json(
106109
107110
:param annotation_json: annotations in SuperAnnotate format JSON or filepath to JSON
108111
:type annotation_json: dict or Pathlike (str or Path)
112+
109113
:param bbox: 4 element list of top-left x,y and bottom-right x, y coordinates
110114
:type bbox: list of floats
115+
111116
:param annotation_class_name: annotation class name
112117
:type annotation_class_name: str
118+
113119
:param annotation_class_attributes: list of annotation class attributes
114120
:type annotation_class_attributes: list of 2 element dicts
121+
115122
:param error: if not None, marks annotation as error (True) or no-error (False)
116123
:type error: bool
117124
"""

src/superannotate/lib/app/interface/cli_interface.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ def _upload_annotations(
185185
):
186186
project_folder_name = project
187187
project_name, folder_name = split_project_path(project)
188-
project = Controller.get_default().get_project_metadata(project_name=project_name).data
188+
project = (
189+
Controller.get_default()
190+
.get_project_metadata(project_name=project_name)
191+
.data
192+
)
189193
if not format:
190194
format = "SuperAnnotate"
191195
if not dataset_name and format == "COCO":

0 commit comments

Comments
 (0)