Skip to content

Commit b7c68ac

Browse files
authored
Merge branch 'friday' into big_file_upload
2 parents f1b70dc + acba6e1 commit b7c68ac

File tree

9 files changed

+24
-11
lines changed

9 files changed

+24
-11
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ jobs:
1414
uses: actions/setup-python@v1
1515
with:
1616
python-version: "3.7"
17+
- name: Upgrade pip
18+
run: >-
19+
python -m
20+
pip install
21+
pip --upgrade
22+
--user
1723
- name: Install pypi/build
1824
run: >-
1925
python -m

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
minversion = 3.7
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import sys
33

4-
__version__ = "4.4.1"
4+
__version__ = "4.4.2dev1"
55

66
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
77

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,6 @@ def download_export(
13471347
)
13481348
if response.errors:
13491349
raise AppException(response.errors)
1350-
logger.info(response.data)
13511350

13521351
def set_project_workflow(
13531352
self, project: Union[NotEmptyStr, dict], new_workflow: List[dict]

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,14 +738,14 @@ def execute(self):
738738
return self._response
739739

740740

741-
class DownloadImageUseCase(BaseUseCase):
741+
class DownloadImageUseCase(BaseReportableUseCase):
742742
def __init__(
743743
self,
744+
reporter: Reporter,
744745
project: ProjectEntity,
745746
folder: FolderEntity,
746747
image: ImageEntity,
747748
images: BaseManageableRepository,
748-
classes: BaseManageableRepository,
749749
backend_service_provider: SuperannotateServiceProvider,
750750
annotation_classes: BaseReadOnlyRepository,
751751
download_path: str,
@@ -754,7 +754,7 @@ def __init__(
754754
include_fuse: bool = False,
755755
include_overlay: bool = False,
756756
):
757-
super().__init__()
757+
super().__init__(reporter)
758758
self._project = project
759759
self._image = image
760760
self._download_path = download_path
@@ -777,7 +777,9 @@ def __init__(
777777
annotation_classes=annotation_classes,
778778
)
779779
self.get_annotation_classes_ues_case = GetAnnotationClassesUseCase(
780-
classes=classes,
780+
reporter=self.reporter,
781+
project=self._project,
782+
backend_client=backend_service_provider
781783
)
782784

783785
def validate_project_type(self):

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,8 @@ def _copy_include_contributors(self, to_project: ProjectEntity):
495495
def _copy_settings(self, to_project: ProjectEntity):
496496
new_settings = self._settings_repo(self._backend_service, to_project)
497497
for setting in self.settings.get_all():
498+
if setting.attribute == "WorkflowType" and not self._include_workflow:
499+
continue
498500
for new_setting in new_settings.get_all():
499501
if new_setting.attribute == setting.attribute:
500502
setting_copy = copy.copy(setting)
@@ -562,7 +564,9 @@ def execute(self):
562564
self._project_to_create.upload_state = (
563565
constances.UploadState.INITIAL.value
564566
)
567+
565568
self._project_to_create.status = constances.ProjectStatus.NotStarted.value
569+
566570
project = self._projects.insert(self._project_to_create)
567571
self.reporter.log_info(
568572
f"Created project {self._project_to_create.name} with type"
@@ -585,6 +589,7 @@ def execute(self):
585589
)
586590
self.reporter.log_debug(str(e), exc_info=True)
587591

592+
588593
if self._include_settings:
589594
self.reporter.log_info(
590595
f"Cloning settings from {self._project.name} to {self._project_to_create.name}."
@@ -632,6 +637,7 @@ def execute(self):
632637
f"Failed to clone contributors from {self._project.name} to {self._project_to_create.name}."
633638
)
634639
self.reporter.log_debug(str(e), exc_info=True)
640+
635641
self._response.data = self._projects.get_one(
636642
uuid=project.id, team_id=project.team_id
637643
)

src/superannotate/lib/infrastructure/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,11 +994,11 @@ def download_image(
994994
image = self._get_image(project, image_name, folder)
995995

996996
use_case = usecases.DownloadImageUseCase(
997+
reporter=self.get_default_reporter(),
997998
project=project,
998999
folder=folder,
9991000
image=image,
10001001
images=self.images,
1001-
classes=AnnotationClassRepository(self._backend_client, project),
10021002
backend_service_provider=self._backend_client,
10031003
download_path=download_path,
10041004
image_variant=image_variant,

tests/integration/aggregations/test_df_processing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import os
2-
from os.path import dirname
32
from pathlib import Path
43

54
import pytest
65

76
from src.superannotate import SAClient
8-
sa = SAClient()
97
from tests.integration.base import BaseTestCase
108

9+
sa = SAClient()
10+
1111

1212
class TestDF(BaseTestCase):
1313
PROJECT_NAME = "test df processing"

tests/integration/annotations/test_upload_annotations_from_folder_to_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def folder_path(self):
2222
@property
2323
def big_annotations_folder_path(self):
2424
return os.path.join(Path(__file__).parent.parent.parent, self.TEST_BIG_FOLDER_PATH)
25-
25+
2626
def test_annotation_folder_upload_download(self):
2727
self._attach_items()
2828
sa.create_annotation_classes_from_classes_json(

0 commit comments

Comments
 (0)