Skip to content

Commit 9ca8a7c

Browse files
committed
Improve docs
1 parent 2f70b9d commit 9ca8a7c

File tree

4 files changed

+13
-25
lines changed

4 files changed

+13
-25
lines changed

docs/source/superannotate.sdk.rst

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,14 @@ Project metadata example:
137137
"creator_id": "hovnatan@superannotate.com",
138138
"updatedAt": "2020-08-31T05:43:43.118Z",
139139
"createdAt": "2020-08-31T05:43:43.118Z"
140-
"type": 1,
140+
"type": "Vector",
141141
"attachment_name": None,
142142
"attachment_path": None,
143143
"entropy_status": 1,
144144
"status": 0,
145145
"...": "..."
146146
}
147147
148-
Most of the fields here are self-explanatory. "type" is an integer value that can be
149-
translated to a string "Pixel" or "Vector" project types using :ref:`project_type_int_to_str <ref_project_type_int_to_str>`.
150148
151149
----------
152150

@@ -178,7 +176,7 @@ Image metadata example:
178176
179177
{
180178
"name": "000000000001.jpg",
181-
"annotation_status": 1,
179+
"annotation_status": "Completed",
182180
"prediction_status": 1,
183181
"segmentation_status": 1,
184182
"annotator_id": None,
@@ -193,12 +191,6 @@ Image metadata example:
193191
"...": "...",
194192
}
195193
196-
Most of the fields here are self-explanatory. "annotation_status" is an integer
197-
value that can be
198-
translated to one of "NotStarted", "InProgress", "QualityCheck", "Returned",
199-
"Completed" or "Skipped" using :ref:`annotation_status_int_to_str
200-
<ref_annotation_status_int_to_str>`.
201-
202194
203195
----------
204196

@@ -264,24 +256,15 @@ Team contributor metadata example:
264256
"...": "...",
265257
}
266258
267-
----------
268-
269-
Metadata helper functions
270-
_________________________
271-
272-
.. _ref_project_type_int_to_str:
273-
.. autofunction:: superannotate.project_type_int_to_str
274-
.. _ref_annotation_status_int_to_str:
275-
.. autofunction:: superannotate.annotation_status_int_to_str
276-
277-
.. _ref_converter:
278259
279260
280261
----------
281262

282263
Annotation JSON helper functions
283264
--------------------------------
284265

266+
.. _ref_converter:
267+
285268
Converting annotation format to and from SuperAnnotate format
286269
_____________________________________________________________
287270

superannotate/dataframe_filtering.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ def filter_images_by_comments(
77
include_resolved_comments=False,
88
include_without_comments=False
99
):
10-
"""Filter images on comment resolve status and comment resolve status
10+
"""Filter images on comment resolve status and comment existence
1111
1212
:param annotations_df: pandas DataFrame of project annotations
1313
:type annotations_df: pandas.DataFrame
1414
:param include_unresolved_comments: include images with unresolved state
1515
:type include_unresolved_comments: bool
1616
:param include_resolved_comments: include images with resolved state
1717
:type include_resolved_comments: bool
18-
:param include_resolved_comments: include images with resolved state
19-
:type include_resolved_comments: bool
2018
:param include_without_comments: include images without any comments
2119
:type include_without_comments: bool
2220
@@ -79,7 +77,10 @@ def filter_images_by_tags(annotations_df, include=None, exclude=None):
7977
def filter_annotation_instances(annotations_df, include=None, exclude=None):
8078
"""Filter annotation instances from project annotations pandas DataFrame.
8179
82-
include and exclude rulses should be a list of rules of following type: [{"className": "<className>", "type" : "<bbox, polygon,...>", "error": <True or False>, "attributes" : [{"name" : "<attribute_value>", "groupName" : "<attribute_group_name>"},...]},...]
80+
include and exclude rulses should be a list of rules of following type:
81+
[{"className": "<className>", "type" : "<bbox, polygon,...>",
82+
"error": <True or False>, "attributes" : [{"name" : "<attribute_value>",
83+
"groupName" : "<attribute_group_name>"},...]},...]
8384
8485
8586
:param annotations_df: pandas DataFrame of project annotations

superannotate/db/project_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def get_project_metadata_bare(project_name):
3535
elif len(results) == 1:
3636
res = results[0]
3737
res["type"] = common.project_type_int_to_str(res["type"])
38+
res["user_role"] = common.user_role_int_to_str(res["user_role"])
3839
return res
3940
else:
4041
raise SANonExistingProjectNameException(

superannotate/db/teams.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ def get_team_metadata():
4545
)
4646

4747
res = response.json()
48+
res["user_role"] = user_role_int_to_str(res["user_role"])
4849
for user in res["users"]:
4950
user["user_role"] = user_role_int_to_str(user["user_role"])
51+
for user in res["pending_invitations"]:
52+
user["user_role"] = user_role_int_to_str(user["user_role"])
5053

5154
return res
5255

0 commit comments

Comments
 (0)