Skip to content

Project Workflow module

Client presentation methods for project workflow.

Source code in kili/presentation/client/project_workflow.py
class ProjectWorkflowClientMethods(BaseClientMethods):
    """Client presentation methods for project workflow."""

    @typechecked
    def update_project_workflow(
        self,
        project_id: str,
        enforce_step_separation: Optional[bool] = None,
    ) -> Dict[str, Any]:
        """Update properties of a project workflow.

        Args:
            project_id: Id of the project.
            enforce_step_separation: Prevents the same user from being assigned to
                multiple steps in the workflow for a same asset,
                ensuring independent review and labeling processes

        Returns:
            A dict with the changed properties which indicates if the mutation was successful,
                else an error message.
        """
        return ProjectWorkflowUseCases(self.kili_api_gateway).update_project_workflow(
            project_id=ProjectId(project_id),
            enforce_step_separation=enforce_step_separation,
        )

update_project_workflow(self, project_id, enforce_step_separation=None)

Update properties of a project workflow.

Parameters:

Name Type Description Default
project_id str

Id of the project.

required
enforce_step_separation Optional[bool]

Prevents the same user from being assigned to multiple steps in the workflow for a same asset, ensuring independent review and labeling processes

None

Returns:

Type Description
Dict[str, Any]

A dict with the changed properties which indicates if the mutation was successful, else an error message.

Source code in kili/presentation/client/project_workflow.py
def update_project_workflow(
    self,
    project_id: str,
    enforce_step_separation: Optional[bool] = None,
) -> Dict[str, Any]:
    """Update properties of a project workflow.

    Args:
        project_id: Id of the project.
        enforce_step_separation: Prevents the same user from being assigned to
            multiple steps in the workflow for a same asset,
            ensuring independent review and labeling processes

    Returns:
        A dict with the changed properties which indicates if the mutation was successful,
            else an error message.
    """
    return ProjectWorkflowUseCases(self.kili_api_gateway).update_project_workflow(
        project_id=ProjectId(project_id),
        enforce_step_separation=enforce_step_separation,
    )