diff --git a/encord/exceptions.py b/encord/exceptions.py index 543d45324..572efcc6b 100644 --- a/encord/exceptions.py +++ b/encord/exceptions.py @@ -54,7 +54,7 @@ class AuthenticationError(EncordException): class AuthorisationError(EncordException): - """Exception thrown when access is unauthorised. + """Exception thrown when access is unauthorized. (E.g. access to a data asset or method). """ @@ -234,7 +234,7 @@ class InvalidArgumentsError(EncordException): class GenericServerError(EncordException): - """The server has reported an error which is not recognised by this SDK version. Try upgrading the SDK version to + """The server has reported an error which is not recognized by this SDK version. Try upgrading the SDK version to see the precise error that is reported. """ diff --git a/encord/objects/ontology_object.py b/encord/objects/ontology_object.py index 75c5abf8c..64cf8827f 100644 --- a/encord/objects/ontology_object.py +++ b/encord/objects/ontology_object.py @@ -69,7 +69,7 @@ def from_dict(cls, d: dict) -> Object: """ shape_opt = Shape.from_string(d["shape"]) if shape_opt is None: - raise TypeError(f"The shape '{d['shape']}' of the object '{d}' is not recognised") + raise TypeError(f"The shape '{d['shape']}' of the object '{d}' is not recognized") attributes_ret: List[Attribute] = [ attribute_from_dict(attribute_dict) for attribute_dict in d.get("attributes", []) diff --git a/encord/orm/dataset.py b/encord/orm/dataset.py index b6c9652a5..9e6381a39 100644 --- a/encord/orm/dataset.py +++ b/encord/orm/dataset.py @@ -364,7 +364,7 @@ def images_data(self) -> Optional[List[ImageData]]: @deprecated("0.1.98", ".is_image_sequence") def is_optimised_image_group(self) -> Optional[bool]: """If the data type is an :meth:`DataType.IMG_GROUP `, - returns whether this is a performance optimised image group. Returns `None` for other data types. + returns whether this is a performance optimized image group. Returns `None` for other data types. DEPRECATED: This method is deprecated and will be removed in the upcoming library version. Please use :meth:`.is_image_sequence` instead diff --git a/encord/orm/label_row.py b/encord/orm/label_row.py index 92b921b78..ba9f34768 100644 --- a/encord/orm/label_row.py +++ b/encord/orm/label_row.py @@ -40,11 +40,11 @@ class LabelRow(base_orm.BaseORM): action) pairs. * ``label_status`` is a string indicating label status. It can take the values enumerated in :class:`encord.orm.label_row.LabelStatus`. *Note* that this does - *not* reflect thes status shown in the Projects->Labels section on the web-app. + *not* reflect the status shown in the Projects->Labels section on the web-app. A data unit, mentioned for the dictionary entry ``data_units`` above, has in the form:: - + ``` label_row = { # The label row # ... "data_units": { @@ -64,7 +64,7 @@ class LabelRow(base_orm.BaseORM): # ..., } } - + ``` A data unit can have any number of vector labels (e.g. bounding box, polygon, keypoint) and classifications. **Objects and classifications** @@ -84,7 +84,7 @@ class LabelRow(base_orm.BaseORM): videos. A labels dictionary for video is in the form:: - + ``` label_row["data_units"][""]["labels"] = { "": { "objects": [ @@ -99,9 +99,9 @@ class LabelRow(base_orm.BaseORM): ], } } - + ``` A labels dictionary for an img_group data unit is in the form:: - + ``` label_row["data_units"][""]["labels"] = { "objects": [ # { object 1 }, @@ -114,9 +114,9 @@ class LabelRow(base_orm.BaseORM): # ... ], } - + ``` The object answers dictionary is in the form:: - + ``` label_row["object_answers"] = { "": { "objectHash": "", @@ -128,9 +128,9 @@ class LabelRow(base_orm.BaseORM): }, # ... } - + ``` The classification answers dictionary is in the form:: - + ``` label_row["classification_answers"] = { "": { "classificationHash": "", @@ -142,9 +142,9 @@ class LabelRow(base_orm.BaseORM): }, # ... } - + ``` The object actions dictionary is in the form:: - + ``` label_row["object_actions"] = { "": { "objectHash": "", @@ -156,7 +156,7 @@ class LabelRow(base_orm.BaseORM): }, # ... } - + ``` """ DB_FIELDS = OrderedDict( diff --git a/encord/orm/project.py b/encord/orm/project.py index 0c1417526..8e51e8f3a 100644 --- a/encord/orm/project.py +++ b/encord/orm/project.py @@ -27,7 +27,7 @@ class Project(base_orm.BaseORM): * editor_ontology, * ontology_hash, * datasets:: - + ``` [ { dataset_hash (uid), @@ -37,8 +37,9 @@ class Project(base_orm.BaseORM): }, ... ], + ``` * label_rows:: - + ``` [ { label_hash (uid), @@ -51,6 +52,7 @@ class Project(base_orm.BaseORM): }, ... ] + ``` * annotation_task_status """ @@ -78,7 +80,7 @@ def get_labels_list(self) -> List[Optional[str]]: a `None` value is appended. This can be useful for working with fetching additional label row data via :meth:`encord.project.Project.get_label_rows` for example. - .. code:: + ``` project = client_instance.get_project() project_orm = project.get_project() @@ -90,6 +92,7 @@ def get_labels_list(self) -> List[Optional[str]]: created_labels_list.append(label) label_rows = project.get_label_rows(created_labels_list, get_signed_url=False) + ``` """ labels = self.label_rows() or [] return [label.get("label_hash") for label in labels]