Skip to content

Commit 2a07bb0

Browse files
committed
Fix attach path
1 parent 234d57b commit 2a07bb0

File tree

10 files changed

+3
-54
lines changed

10 files changed

+3
-54
lines changed

src/superannotate/lib/core/usecases/items.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def execute(self) -> Response:
260260
to_upload_meta = {}
261261
for attachment in attachments:
262262
if attachment.name not in duplications:
263-
to_upload.append({"name": attachment.name, "url": attachment.url})
263+
to_upload.append({"name": attachment.name, "path": attachment.url})
264264
to_upload_meta[attachment.name] = self.generate_meta()
265265
if to_upload:
266266
backend_response = self._backend_service.attach_files(

src/superannotate/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.3.3dev2"
1+
__version__ = "4.3.3dev3"

tests/integration/test_benchmark.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
import tempfile
3-
import time
43
from os.path import dirname
54

65
import pytest

tests/integration/test_depricated_functions_document.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ def test_deprecated_functions(self):
8080
sa.upload_image_annotations(self.PROJECT_NAME, "some", self.annotation_path)
8181
except AppException as e:
8282
self.assertIn(self.EXCEPTION_MESSAGE, str(e))
83-
# TODO:
84-
# try:
85-
# sa.download_image(self.PROJECT_NAME, self.UPLOAD_IMAGE_NAME, './')
86-
# except AppException as e:
87-
# self.assertIn(self.EXCEPTION_MESSAGE, str(e))
8883
try:
8984
sa.download_image_annotations(self.PROJECT_NAME, self.UPLOAD_IMAGE_NAME, "./")
9085
except AppException as e:

tests/integration/test_depricated_functions_video.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,6 @@ def test_deprecated_functions(self):
7575
sa.upload_image_annotations(self.PROJECT_NAME, "some", self.annotation_path)
7676
except AppException as e:
7777
self.assertIn(self.EXCEPTION_MESSAGE, str(e))
78-
# TODO:
79-
# try:
80-
# sa.download_image(self.PROJECT_NAME, self.UPLOAD_IMAGE_NAME, './')
81-
# except AppException as e:
82-
# self.assertIn(self.EXCEPTION_MESSAGE, str(e))
8378
try:
8479
sa.download_image_annotations(self.PROJECT_NAME, self.UPLOAD_IMAGE_NAME, "./")
8580
except AppException as e:

tests/integration/test_image_copy_move.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -142,36 +142,3 @@ def test_copy_image_with_arguments(self):
142142
self.PROJECT_NAME, self.EXAMPLE_IMAGE, f"{self.PROJECT_NAME}/{self.TEST_FOLDER}",
143143
copy_annotation_status=True
144144
)
145-
146-
# def test_image_copy_folders(tmpdir):
147-
# tmpdir = Path(tmpdir)
148-
149-
# projects_found = sa.search_projects(
150-
# PROJECT_NAME_FOLDER, return_metadata=True
151-
# )
152-
# for pr in projects_found:
153-
# sa.delete_project(pr)
154-
155-
# project = sa.create_project(PROJECT_NAME_FOLDER, "test", "Vector")
156-
157-
# sa.upload_image_to_project(
158-
# project,
159-
# "./tests/sample_project_vector/example_image_1.jpg",
160-
# annotation_status="InProgress"
161-
# )
162-
# sa.upload_image_to_project(
163-
# project,
164-
# "./tests/sample_project_vector/example_image_2.jpg",
165-
# annotation_status="InProgress"
166-
# )
167-
168-
# sa.create_folder(project, "folder1")
169-
170-
# sa.copy_image(
171-
# project, ["example_image_1.jpg", "example_image_2.jpg"],
172-
# project["name"] + "/folder1"
173-
# )
174-
# sa.copy_image(
175-
# project, ["example_image_1.jpg", "example_image_2.jpg"],
176-
# project["name"] + "/folder1"
177-
# )

tests/integration/test_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def test_download_fuse_without_classes(self):
165165
)
166166
self.assertIsNotNone(result)
167167

168-
def test_validate_log_for_single_uplaod(self):
168+
def test_validate_log_for_single_upload(self):
169169
with self.assertLogs() as logs:
170170
sa.upload_image_to_project(self.PROJECT_NAME, f"{self.folder_path}/{self.EXAMPLE_IMAGE_1}")
171171
sa.upload_image_annotations(

tests/integration/test_recursive_folder_pixel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import os
2-
from os.path import dirname
3-
41
import src.superannotate as sa
52
from tests.integration.base import BaseTestCase
63

tests/integration/test_single_annotation_download.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def classes_path(self):
2727
dirname(dirname(__file__)), self.TEST_FOLDER_PATH, "classes/classes.json"
2828
)
2929

30-
3130
# TODO: template name validation error
3231
def test_annotation_download_upload_vector(self):
3332
sa.upload_images_from_folder_to_project(

tests/integration/test_upload_images.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
from os.path import dirname
33

44
import src.superannotate as sa
5-
from src.superannotate import AppException
6-
from src.superannotate.lib.core import ATTACHING_UPLOAD_STATE_ERROR
7-
from src.superannotate.lib.core import UPLOADING_UPLOAD_STATE_ERROR
85
from tests.integration.base import BaseTestCase
96

107

0 commit comments

Comments
 (0)