Skip to content

Commit 0135ca2

Browse files
Vaghinak BasentsyanVaghinak Basentsyan
authored andcommitted
Merge remote-tracking branch 'origin/develop' into attach_documnet
# Conflicts: # src/superannotate/lib/app/interface/sdk_interface.py # src/superannotate/lib/core/usecases.py # tests/integration/test_cli.py
2 parents aaa0d34 + 5523e64 commit 0135ca2

38 files changed

+9956
-1256
lines changed

.github/workflows/python-tests.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

docs/source/superannotate.sdk.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ _________________
126126
.. autofunction:: superannotate.get_team_metadata
127127
.. autofunction:: superannotate.invite_contributor_to_team
128128
.. autofunction:: superannotate.delete_contributor_to_team_invitation
129+
.. autofunction:: superannotate.search_team_contributors
129130

130131
----------
131132

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 = -n32 --dist=loadscope
5+
;addopts = -n 32 --dist=loadscope

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ xmltodict==0.12.0
1010
opencv-python==4.4.0.42
1111
wheel==0.35.1
1212
packaging>=20.4
13-
pandas==1.1.2
13+
pandas>=1.1.4
1414
plotly==4.1.0
1515
ffmpeg-python>=0.2.0
16-
google-cloud-storage>=1.33.0
17-
azure-storage-blob>=12.6.0
1816
fire==0.4.0
1917
Shapely==1.7.1
2018
mixpanel==4.8.3
21-
typeguard==2.12.1
19+
pydantic>=1.8.2
20+
pydantic[email]
21+
setuptools~=57.4.0

src/superannotate/__init__.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,9 @@
136136
)
137137
from superannotate.lib.app.interface.sdk_interface import upload_image_annotations
138138
from superannotate.lib.app.interface.sdk_interface import upload_image_to_project
139-
from superannotate.lib.app.interface.sdk_interface import (
140-
upload_images_from_azure_blob_to_project,
141-
)
142139
from superannotate.lib.app.interface.sdk_interface import (
143140
upload_images_from_folder_to_project,
144141
)
145-
from superannotate.lib.app.interface.sdk_interface import (
146-
upload_images_from_google_cloud_to_project,
147-
)
148142
from superannotate.lib.app.interface.sdk_interface import (
149143
upload_images_from_public_urls_to_project,
150144
)
@@ -244,8 +238,6 @@
244238
"upload_image_to_project",
245239
"upload_image_annotations",
246240
"upload_images_from_public_urls_to_project",
247-
"upload_images_from_google_cloud_to_project",
248-
"upload_images_from_azure_blob_to_project",
249241
"upload_images_from_s3_bucket_to_project",
250242
"upload_images_from_folder_to_project",
251243
"attach_image_urls_to_project",
@@ -298,8 +290,8 @@
298290

299291
__author__ = "Superannotate"
300292

301-
302-
file_dir = os.path.split(os.path.realpath(__file__))[0]
303-
sys.path.append(file_dir)
304-
logging.config.fileConfig(os.path.join(file_dir, "logging.conf"))
305-
logger = logging.getLogger()
293+
WORKING_DIR = os.path.split(os.path.realpath(__file__))[0]
294+
sys.path.append(WORKING_DIR)
295+
logging.config.fileConfig(
296+
os.path.join(WORKING_DIR, "logging.conf"), disable_existing_loggers=False
297+
)

src/superannotate/lib/app/helpers.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,13 @@ def get_s3_annotation_paths(folder_path, s3_bucket, annotation_paths, recursive)
7272
paginator = s3_client.get_paginator("list_objects_v2")
7373
for data in paginator.paginate(Bucket=s3_bucket, Prefix=folder_path):
7474
for annotation in data["Contents"]:
75-
if annotation["Key"].endswith(VECTOR_ANNOTATION_POSTFIX) or annotation[
76-
"Key"
77-
].endswith(PIXEL_ANNOTATION_POSTFIX):
78-
annotation_paths.append(annotation["Key"])
75+
key = annotation["Key"]
76+
if key.endswith(VECTOR_ANNOTATION_POSTFIX) or key.endswith(
77+
PIXEL_ANNOTATION_POSTFIX
78+
):
79+
if not recursive and "/" in key[len(folder_path) + 1 :]:
80+
continue
81+
annotation_paths.append(key)
7982
return list(set(annotation_paths))
8083

8184

0 commit comments

Comments
 (0)