Skip to main content

LabelReview Objects

class LabelReview(BaseDTO)

approve

def approve(*, bundle: Optional[Bundle] = None)
Approves the review. Parameters
  • bundle (Optional[Bundle]): Optional bundle parameter.

reject

def reject(*,
           comment: Optional[str] = None,
           issue_tags: Optional[List[str]] = None,
           bundle: Optional[Bundle] = None)
Rejects the review. Parameters
  • bundle (Optional[Bundle]): Optional bundle parameter.

reopen

def reopen(*, bundle: Optional[Bundle] = None)
Reopens the review. Parameters
  • bundle (Optional[Bundle]): Optional bundle parameter.

ReviewStage Objects

class ReviewStage(WorkflowStageBase)

stage_type

The Review stage for Workflows. This stage can appear in Consensus and non-Consensus Workflows.

get_tasks

def get_tasks(
    *,
    assignee: Union[List[str], str, None] = None,
    data_hash: Union[List[UUID], UUID, List[str], str, None] = None,
    dataset_hash: Union[List[UUID], UUID, List[str], str, None] = None,
    data_title: Optional[str] = None,
    status: Union[ReviewTaskStatus, List[ReviewTaskStatus], None] = None
) -> Iterable[ReviewTask]
Retrieves tasks for the ReviewStage. Parameters
  • assignee (Union[List[str], str, None]): User assigned to a task.
  • data_hash (Union[List[UUID], UUID, List[str], str, None]): Unique ID for the data unit.
  • dataset_hash (Union[List[UUID], UUID, List[str], str, None]): Unique ID for the dataset that the data unit belongs to.
  • data_title (Optional[str]): Name of the data unit.
  • status (Union[ReviewTaskStatus, List[ReviewTaskStatus], None]): Status of the task.
Returns An iterable of ReviewTask instances with the following information:
  • uuid: Unique identifier for the task.
  • created_at: Time and date the task was created.
  • updated_at: Time and date the task was last edited.
  • assignee: The user currently assigned to the task. The value is None if no one is assigned to the task.
  • data_hash: Unique identifier for the data unit.
  • data_title: Name/title of the data unit.

ReviewTask Objects

class ReviewTask(WorkflowTask)
Represents tasks in non-Consensus Review stages. Attributes
  • status (ReviewTaskStatus): Status of the review task.
  • data_hash (UUID): Unique identifier for the data unit.
  • data_title (str): Name of the data unit.
  • assignee (Optional[str]): User assigned to the task.
Allowed actions
  • approve: Approves a task.
  • reject: Rejects a task.
  • assign: Assigns a task to a user.
  • release: Releases a task from the current user.
  • move: Moves the review task to another stage in the workflow.

approve

def approve(*,
            assignee: Optional[str] = None,
            retain_assignee: bool = False,
            bundle: Optional[Bundle] = None) -> None
Approves the task. Parameters
  • assignee (Optional[str]): User email to be assigned to the task whilst approving the task.
  • retain_assignee (bool): Retains the current assignee whilst approving the task. This is ignored if assignee is provided. An error will occur if the task does not already have an assignee and retain_assignee is True.
  • bundle (Optional[Bundle]): Optional bundle parameter.
Returns None

reject

def reject(*,
           assignee: Optional[str] = None,
           retain_assignee: bool = False,
           bundle: Optional[Bundle] = None) -> None
Rejects the task. Parameters
  • assignee (Optional[str]): User email to be assigned to the task whilst rejecting the task.
  • retain_assignee (bool): Retains the current assignee whilst rejecting the task. This is ignored if assignee is provided. An error will occur if the task does not already have an assignee and retain_assignee is True.
  • bundle (Optional[Bundle]): Optional bundle parameter.
Returns None

assign

def assign(assignee: str, *, bundle: Optional[Bundle] = None) -> None
Assigns the task to a user. Parameters
  • assignee (str): The user to assign the task to.
  • bundle (Optional[Bundle]): Optional bundle parameter.
Returns None

release

def release(*, bundle: Optional[Bundle] = None) -> None
Releases the task from the current user. Parameters
  • bundle (Optional[Bundle]): Optional bundle parameter.
Returns None

move

def move(*,
         destination_stage_uuid: UUID,
         bundle: Optional[Bundle] = None) -> None
Moves the review task from its current stage to another stage. Parameters
  • destination_stage_uuid (UUID): Unique identifier of the stage to move the task to.
  • bundle (Optional[Bundle]): Optional bundle parameter.
Returns None

get_label_reviews

def get_label_reviews(
    status: Union[ReviewTaskStatus, List[ReviewTaskStatus], None] = None
) -> Iterable[LabelReview]
Retrieves label reviews for the Review task. Parameters
  • status (Union[ReviewTaskStatus, List[ReviewTaskStatus], None]): Status of the task.
Returns An iterable of ReviewTask instances with the following information:
  • uuid: Unique identifier for label review.
  • status: Current status of the label review.
  • label_type: Type of the label. Can be either Object or Classification.
  • label_id: Unique identifier of the label.

issues

@property
def issues() -> TaskIssues
Returns the issue client for the task.