|
11 | 11 | SANonExistingAnnotationClassNameException |
12 | 12 | ) |
13 | 13 | from .project_api import get_project_metadata_bare |
14 | | -from ..mixp.decorators import trackable |
| 14 | +from ..mixp.decorators import Trackable |
| 15 | + |
15 | 16 | logger = logging.getLogger("superannotate-python-sdk") |
16 | 17 |
|
17 | 18 | _api = API.get_instance() |
18 | 19 |
|
19 | | -@trackable |
| 20 | + |
| 21 | +@Trackable |
20 | 22 | def create_annotation_class(project, name, color, attribute_groups=None): |
21 | 23 | """Create annotation class in project |
22 | 24 |
|
@@ -78,7 +80,8 @@ def create_annotation_class(project, name, color, attribute_groups=None): |
78 | 80 | new_class = res[0] |
79 | 81 | return new_class |
80 | 82 |
|
81 | | -@trackable |
| 83 | + |
| 84 | +@Trackable |
82 | 85 | def delete_annotation_class(project, annotation_class): |
83 | 86 | """Deletes annotation class from project |
84 | 87 |
|
@@ -112,7 +115,8 @@ def delete_annotation_class(project, annotation_class): |
112 | 115 | "Couldn't delete annotation class " + response.text |
113 | 116 | ) |
114 | 117 |
|
115 | | -@trackable |
| 118 | + |
| 119 | +@Trackable |
116 | 120 | def create_annotation_classes_from_classes_json( |
117 | 121 | project, classes_json, from_s3_bucket=None |
118 | 122 | ): |
@@ -199,7 +203,8 @@ def del_unn(d): |
199 | 203 | assert len(res) == len(new_classes) |
200 | 204 | return res |
201 | 205 |
|
202 | | -@trackable |
| 206 | + |
| 207 | +@Trackable |
203 | 208 | def search_annotation_classes(project, name_prefix=None): |
204 | 209 | """Searches annotation classes by name_prefix (case-insensitive) |
205 | 210 |
|
@@ -238,7 +243,8 @@ def search_annotation_classes(project, name_prefix=None): |
238 | 243 |
|
239 | 244 | return result_list |
240 | 245 |
|
241 | | -@trackable |
| 246 | + |
| 247 | +@Trackable |
242 | 248 | def get_annotation_class_metadata(project, annotation_class_name): |
243 | 249 | """Returns annotation class metadata |
244 | 250 |
|
@@ -271,7 +277,8 @@ def get_annotation_class_metadata(project, annotation_class_name): |
271 | 277 | " doesn't exist." |
272 | 278 | ) |
273 | 279 |
|
274 | | -@trackable |
| 280 | + |
| 281 | +@Trackable |
275 | 282 | def download_annotation_classes_json(project, folder): |
276 | 283 | """Downloads project classes.json to folder |
277 | 284 |
|
|
0 commit comments