Skip to content

Commit

Permalink
feat: 🎸 add auto_assign field in update properties in project
Browse files Browse the repository at this point in the history
  • Loading branch information
florianlega committed Jun 12, 2024
1 parent 72802b7 commit 0c5df1d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/kili/adapters/kili_api_gateway/project/mappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ def project_data_mapper(data: ProjectDataKiliAPIGatewayInput) -> Dict:
"shouldRelaunchKpiComputation": data.should_relaunch_kpi_computation,
"title": data.title,
"useHoneyPot": data.use_honeypot,
"useAutoAssign": data.use_auto_assign,
}
1 change: 1 addition & 0 deletions src/kili/adapters/kili_api_gateway/project/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ class ProjectDataKiliAPIGatewayInput:
should_relaunch_kpi_computation: Optional[bool]
title: Optional[str]
use_honeypot: Optional[bool]
use_auto_assign: Optional[bool]
3 changes: 3 additions & 0 deletions src/kili/presentation/client/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ def update_properties_in_project(
should_relaunch_kpi_computation: Optional[bool] = None,
title: Optional[str] = None,
use_honeypot: Optional[bool] = None,
use_auto_assign: Optional[bool] = None,
metadata_types: Optional[dict] = None,
) -> Dict[str, Any]:
"""Update properties of a project.
Expand Down Expand Up @@ -324,6 +325,7 @@ def update_properties_in_project(
in honeypot or consensus settings
title: Title of the project
use_honeypot: Activate / Deactivate the use of honeypot in the project
use_auto_assign: Activate / Deactivate the auto assign in the project
metadata_types: Types of the project metadata.
Should be a `dict` of metadata fields name as keys and metadata types as values.
Currently, possible types are: `string`, `number`
Expand Down Expand Up @@ -373,6 +375,7 @@ def update_properties_in_project(
review_coverage=review_coverage,
should_relaunch_kpi_computation=should_relaunch_kpi_computation,
use_honeypot=use_honeypot,
use_auto_assign=use_auto_assign,
title=title,
metadata_types=metadata_types,
)
Expand Down
2 changes: 2 additions & 0 deletions src/kili/services/copy_project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ProjectCopier: # pylint: disable=too-few-public-methods
"minConsensusSize",
"useHoneyPot",
"reviewCoverage",
"useAutoAssign"
)

def __init__(self, kili: "Kili") -> None:
Expand Down Expand Up @@ -159,6 +160,7 @@ def _copy_quality_settings(self, new_project_id: str, src_project: Dict) -> None
consensus_tot_coverage=src_project["consensusTotCoverage"],
min_consensus_size=src_project["minConsensusSize"],
use_honeypot=src_project["useHoneyPot"],
use_auto_assign=src_project["useAutoAssign"],
review_coverage=src_project["reviewCoverage"],
)

Expand Down
2 changes: 2 additions & 0 deletions src/kili/use_cases/project/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def update_properties_in_project(
should_relaunch_kpi_computation: Optional[bool],
title: Optional[str],
use_honeypot: Optional[bool],
use_auto_assign: Optional[bool],
metadata_types: Optional[Dict],
) -> Dict[str, object]:
"""Update properties in a project."""
Expand Down Expand Up @@ -125,6 +126,7 @@ def update_properties_in_project(
should_relaunch_kpi_computation=should_relaunch_kpi_computation,
title=title,
use_honeypot=use_honeypot,
use_auto_assign=use_auto_assign,
archived=None,
author=None,
rules=None,
Expand Down

0 comments on commit 0c5df1d

Please sign in to comment.