Skip to content

Commit 34620a4

Browse files
committed
Rename class to ProjectOverview and provide additional comments
1 parent 3395067 commit 34620a4

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

libs/labelbox/src/labelbox/schema/project.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from labelbox.schema.task import Task
4040
from labelbox.schema.task_queue import TaskQueue
4141
from labelbox.schema.ontology_kind import (EditorTaskType, OntologyKind)
42-
from labelbox.schema.project_overview import Project_Overview
42+
from labelbox.schema.project_overview import ProjectOverview
4343

4444
if TYPE_CHECKING:
4545
from labelbox import BulkImportRequest
@@ -1747,7 +1747,7 @@ def __check_data_rows_have_been_processed(
17471747
return response["queryAllDataRowsHaveBeenProcessed"][
17481748
"allDataRowsHaveBeenProcessed"]
17491749

1750-
def get_overview(self) -> Project_Overview:
1750+
def get_overview(self) -> ProjectOverview:
17511751
""" Return the number of data rows per task queue, and issues of a project
17521752
Equivalent of the Overview tab of a project
17531753
@@ -1802,7 +1802,7 @@ def get_overview(self) -> Project_Overview:
18021802
overview["to_label"] = overview.pop("unlabeled")
18031803
overview["all_in_data_rows"] = overview.pop("all")
18041804

1805-
return Project_Overview(**overview)
1805+
return ProjectOverview(**overview)
18061806

18071807

18081808
class ProjectMember(DbObject):

libs/labelbox/src/labelbox/schema/project_overview.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
from typing import Dict, Optional
22
from labelbox import pydantic_compat
33

4-
class Project_Overview(pydantic_compat.BaseModel):
4+
class ProjectOverview(pydantic_compat.BaseModel):
55
"""
6-
Class that represents a project overview.
6+
Class that represents a project overview as displayed in the UI
7+
All attributes represent the number of data rows in the corresponding state.
8+
The `in_review` attribute is a dictionary where the keys are the queue names
9+
and the values are the number of data rows in that queue.
710
"""
811
to_label: int
912
in_review: Dict[str, int]

0 commit comments

Comments
 (0)