-
Notifications
You must be signed in to change notification settings - Fork 15
Updates SDK Ref doc strings #1009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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:: | ||
|
|
||
| ``` | ||
|
Comment on lines
86
to
+87
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| label_row["data_units"]["<data_hash>"]["labels"] = { | ||
| "<frame_number>": { | ||
| "objects": [ | ||
|
|
@@ -99,9 +99,9 @@ class LabelRow(base_orm.BaseORM): | |
| ], | ||
| } | ||
| } | ||
|
|
||
| ``` | ||
| A labels dictionary for an img_group data unit is in the form:: | ||
|
|
||
| ``` | ||
|
Comment on lines
103
to
+104
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| label_row["data_units"]["<data_hash>"]["labels"] = { | ||
| "objects": [ | ||
| # { object 1 }, | ||
|
|
@@ -114,9 +114,9 @@ class LabelRow(base_orm.BaseORM): | |
| # ... | ||
| ], | ||
| } | ||
|
|
||
| ``` | ||
| The object answers dictionary is in the form:: | ||
|
|
||
| ``` | ||
|
Comment on lines
118
to
+119
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| label_row["object_answers"] = { | ||
| "<object_hash>": { | ||
| "objectHash": "<object_hash>", | ||
|
|
@@ -128,9 +128,9 @@ class LabelRow(base_orm.BaseORM): | |
| }, | ||
| # ... | ||
| } | ||
|
|
||
| ``` | ||
| The classification answers dictionary is in the form:: | ||
|
|
||
| ``` | ||
|
Comment on lines
132
to
+133
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| label_row["classification_answers"] = { | ||
| "<classification_hash>": { | ||
| "classificationHash": "<classification_hash>", | ||
|
|
@@ -142,9 +142,9 @@ class LabelRow(base_orm.BaseORM): | |
| }, | ||
| # ... | ||
| } | ||
|
|
||
| ``` | ||
| The object actions dictionary is in the form:: | ||
|
|
||
| ``` | ||
|
Comment on lines
146
to
+147
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| label_row["object_actions"] = { | ||
| "<object_hash>": { | ||
| "objectHash": "<object_hash>", | ||
|
|
@@ -156,7 +156,7 @@ class LabelRow(base_orm.BaseORM): | |
| }, | ||
| # ... | ||
| } | ||
|
|
||
| ``` | ||
| """ | ||
|
|
||
| DB_FIELDS = OrderedDict( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ class Project(base_orm.BaseORM): | |
| * editor_ontology, | ||
| * ontology_hash, | ||
| * datasets:: | ||
|
|
||
| ``` | ||
|
Comment on lines
29
to
+30
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| [ | ||
| { | ||
| dataset_hash (uid), | ||
|
|
@@ -37,8 +37,9 @@ class Project(base_orm.BaseORM): | |
| }, | ||
| ... | ||
| ], | ||
| ``` | ||
| * label_rows:: | ||
|
|
||
| ``` | ||
|
Comment on lines
41
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| [ | ||
| { | ||
| 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_hash>) | ||
| 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] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While migrating the docstrings to use Markdown code blocks, the reStructuredText directive
::was left behind. This will be rendered as literal double colons in Markdown. It should be a single colon:for correct grammar and formatting.