Skip to content

Commit d659c8a

Browse files
authored
Merge pull request #427 from superannotateai/friday
Friday
2 parents 8202f83 + 4801ecf commit d659c8a

File tree

77 files changed

+5585
-3271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+5585
-3271
lines changed

.github/workflows/build.yml

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

.github/workflows/checks_and_dev_deploy.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,4 @@ jobs:
2828
runs-on: ubuntu-20.04
2929
steps:
3030
- uses: actions/checkout@v2
31-
-
32-
name: Set up QEMU
33-
uses: docker/setup-qemu-action@v1
34-
-
35-
name: Set up Docker Buildx
36-
uses: docker/setup-buildx-action@v1
37-
-
38-
name: Login to DockerHub
39-
uses: docker/login-action@v1
40-
with:
41-
username: ${{ secrets.DOCKER_USERNAME }}
42-
password: ${{ secrets.DOCKER_PASSWORD }}
43-
-
44-
name: Build and push to Docker Hub
45-
id: docker_build
46-
uses: docker/build-push-action@v2
47-
with:
48-
push: true
49-
file: Dockerfile_dev_env
50-
tags: superannotate/pythonsdk-dev-env:latest
51-
31+

.github/workflows/pre_release.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,4 @@ jobs:
2424
uses: pypa/gh-action-pypi-publish@master
2525
with:
2626
password: ${{ secrets.pypi_password }}
27-
-
28-
name: Set up QEMU
29-
uses: docker/setup-qemu-action@v1
30-
-
31-
name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v1
33-
-
34-
name: Login to DockerHub
35-
uses: docker/login-action@v1
36-
with:
37-
username: ${{ secrets.DOCKER_USERNAME }}
38-
password: ${{ secrets.DOCKER_PASSWORD }}
39-
-
40-
name: Build and push to Docker Hub
41-
id: docker_build
42-
uses: docker/build-push-action@v2
43-
with:
44-
push: true
45-
tags: superannotate/pythonsdk:dev
46-
build-args: PIP_FLAGS=--pre
27+

.github/workflows/release.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,4 @@ jobs:
2525
with:
2626
password: ${{ secrets.pypi_password }}
2727
verbose: true
28-
-
29-
name: Set up QEMU
30-
uses: docker/setup-qemu-action@v1
31-
-
32-
name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@v1
34-
-
35-
name: Login to DockerHub
36-
uses: docker/login-action@v1
37-
with:
38-
username: ${{ secrets.DOCKER_USERNAME }}
39-
password: ${{ secrets.DOCKER_PASSWORD }}
40-
-
41-
name: Build and push to Docker Hub
42-
id: docker_build
43-
uses: docker/build-push-action@v2
44-
with:
45-
push: true
46-
tags: superannotate/pythonsdk:latest
28+

docs/source/superannotate.sdk.rst

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ ________
3636
.. autofunction:: superannotate.delete_folders
3737
.. autofunction:: superannotate.upload_images_to_project
3838
.. autofunction:: superannotate.attach_image_urls_to_project
39-
.. autofunction:: superannotate.upload_images_from_public_urls_to_project
4039
.. autofunction:: superannotate.attach_document_urls_to_project
4140
.. autofunction:: superannotate.attach_items_from_integrated_storage
4241
.. autofunction:: superannotate.upload_image_to_project
@@ -70,6 +69,15 @@ _______
7069

7170
----------
7271

72+
Items
73+
______
74+
75+
.. autofunction:: superannotate.query
76+
.. autofunction:: superannotate.search_items
77+
.. autofunction:: superannotate.get_item_metadata
78+
79+
----------
80+
7381
Images
7482
______
7583

@@ -81,7 +89,6 @@ ______
8189
.. autofunction:: superannotate.download_image
8290
.. autofunction:: superannotate.set_image_annotation_status
8391
.. autofunction:: superannotate.set_images_annotation_statuses
84-
.. autofunction:: superannotate.get_image_annotations
8592
.. autofunction:: superannotate.download_image_annotations
8693
.. autofunction:: superannotate.upload_image_annotations
8794
.. autofunction:: superannotate.copy_image
@@ -175,6 +182,44 @@ Export metadata example:
175182
}
176183
177184
185+
----------
186+
187+
Integration metadata
188+
_______________
189+
190+
Integration metadata example:
191+
192+
.. code-block:: python
193+
194+
{
195+
"name": "My S3 Bucket",
196+
"type": "aws",
197+
"root": "test-openseadragon-1212"
198+
}
199+
200+
201+
----------
202+
203+
Item metadata
204+
_______________
205+
206+
Item metadata example:
207+
208+
.. code-block:: python
209+
210+
{
211+
"name": "example.jpeg",
212+
"path": "project/folder_1/meow.jpeg",
213+
"url": "https://sa-public-files.s3.../text_file_example_1.jpeg",
214+
"annotation_status": "NotStarted",
215+
"annotator_name": None,
216+
"qa_name": None,
217+
"entropy_value": None,
218+
"createdAt": "2022-02-15T20:46:44.000Z",
219+
"updatedAt": "2022-02-15T20:46:44.000Z"
220+
}
221+
222+
178223
----------
179224

180225
Image metadata
@@ -188,8 +233,8 @@ Image metadata example:
188233
{
189234
"name": "000000000001.jpg",
190235
"annotation_status": "Completed",
191-
"prediction_status": 1,
192-
"segmentation_status": 1,
236+
"prediction_status": "NotStarted",
237+
"segmentation_status": "NotStarted",
193238
"annotator_id": None,
194239
"annotator_name": None,
195240
"qa_id": None,

requirements_dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
superannotate_schemas>=1.0.40b3
1+
superannotate_schemas>=1.0.41dev1

src/superannotate/__init__.py

Lines changed: 12 additions & 11 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
@@ -55,9 +57,9 @@
5557
from superannotate.lib.app.interface.sdk_interface import get_annotations_per_frame
5658
from superannotate.lib.app.interface.sdk_interface import get_exports
5759
from superannotate.lib.app.interface.sdk_interface import get_folder_metadata
58-
from superannotate.lib.app.interface.sdk_interface import get_image_annotations
5960
from superannotate.lib.app.interface.sdk_interface import get_image_metadata
6061
from superannotate.lib.app.interface.sdk_interface import get_integrations
62+
from superannotate.lib.app.interface.sdk_interface import get_item_metadata
6163
from superannotate.lib.app.interface.sdk_interface import (
6264
get_project_and_folder_metadata,
6365
)
@@ -71,12 +73,14 @@
7173
from superannotate.lib.app.interface.sdk_interface import move_images
7274
from superannotate.lib.app.interface.sdk_interface import pin_image
7375
from superannotate.lib.app.interface.sdk_interface import prepare_export
76+
from superannotate.lib.app.interface.sdk_interface import query
7477
from superannotate.lib.app.interface.sdk_interface import rename_project
7578
from superannotate.lib.app.interface.sdk_interface import run_prediction
7679
from superannotate.lib.app.interface.sdk_interface import search_annotation_classes
7780
from superannotate.lib.app.interface.sdk_interface import search_folders
7881
from superannotate.lib.app.interface.sdk_interface import search_images
7982
from superannotate.lib.app.interface.sdk_interface import search_images_all_folders
83+
from superannotate.lib.app.interface.sdk_interface import search_items
8084
from superannotate.lib.app.interface.sdk_interface import search_models
8185
from superannotate.lib.app.interface.sdk_interface import search_projects
8286
from superannotate.lib.app.interface.sdk_interface import search_team_contributors
@@ -98,16 +102,11 @@
98102
from superannotate.lib.app.interface.sdk_interface import (
99103
upload_images_from_folder_to_project,
100104
)
101-
from superannotate.lib.app.interface.sdk_interface import (
102-
upload_images_from_public_urls_to_project,
103-
)
104105
from superannotate.lib.app.interface.sdk_interface import upload_images_to_project
105106
from superannotate.lib.app.interface.sdk_interface import (
106107
upload_preannotations_from_folder_to_project,
107108
)
108-
from superannotate.lib.app.interface.sdk_interface import (
109-
upload_priority_scores,
110-
)
109+
from superannotate.lib.app.interface.sdk_interface import upload_priority_scores
111110
from superannotate.lib.app.interface.sdk_interface import upload_video_to_project
112111
from superannotate.lib.app.interface.sdk_interface import (
113112
upload_videos_from_folder_to_project,
@@ -159,6 +158,7 @@
159158
"clone_project",
160159
"share_project",
161160
"delete_project",
161+
"rename_project",
162162
"upload_priority_scores",
163163
# Images Section
164164
"search_images",
@@ -171,6 +171,10 @@
171171
"search_folders",
172172
"assign_folder",
173173
"unassign_folder",
174+
# Items Section
175+
"get_item_metadata",
176+
"search_items",
177+
"query",
174178
# Image Section
175179
"copy_images",
176180
"move_images",
@@ -186,7 +190,6 @@
186190
"delete_annotations",
187191
"upload_image_to_project",
188192
"upload_image_annotations",
189-
"upload_images_from_public_urls_to_project",
190193
"upload_images_from_folder_to_project",
191194
"attach_image_urls_to_project",
192195
"attach_video_urls_to_project",
@@ -202,7 +205,6 @@
202205
"add_annotation_bbox_to_image",
203206
"add_annotation_point_to_image",
204207
"add_annotation_comment_to_image",
205-
"get_image_annotations",
206208
"search_annotation_classes",
207209
"create_annotation_classes_from_classes_json",
208210
"upload_annotations_from_folder_to_project",
@@ -212,7 +214,6 @@
212214
"run_prediction",
213215
"search_models",
214216
"download_model",
215-
"rename_project",
216217
"set_image_annotation_status",
217218
"benchmark",
218219
"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/analytics/aggregators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def aggregate_video_annotations_as_df(self, annotation_paths: List[str]):
143143
raw_data.videoStatus = annotation_data["metadata"].get("status")
144144
raw_data.videoUrl = annotation_data["metadata"].get("url")
145145
raw_data.videoDuration = annotation_data["metadata"].get("duration")
146-
# todo check
146+
147147
raw_data.videoError = annotation_data["metadata"].get("error")
148148
raw_data.videoAnnotator = annotation_data["metadata"].get("annotatorEmail")
149149
raw_data.videoQA = annotation_data["metadata"].get("qaEmail")

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
"""

0 commit comments

Comments
 (0)