diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 9b3aaf382..99abcd937 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -331,6 +331,7 @@ types: show_skip_button: type: optional docs: Show a skip button in interface and allow annotators to skip the task + show_unused_data_columns_to_annotators: optional skip_queue: optional skipped_annotations_number: string start_training_on_annotation_update: @@ -3451,6 +3452,7 @@ types: show_skip_button: type: optional docs: Show a skip button in interface and allow annotators to skip the task + show_unused_data_columns_to_annotators: optional skip_queue: optional skipped_annotations_number: type: integer @@ -3839,6 +3841,7 @@ types: show_skip_button: type: optional docs: Show a skip button in interface and allow annotators to skip the task + show_unused_data_columns_to_annotators: optional skip_queue: optional skipped_annotations_number: type: integer @@ -5934,6 +5937,15 @@ types: user: integer source: openapi: openapi/openapi.yaml + ProjectMemberBulkAssignRolesRequest: + properties: + role: Role9E7Enum + user_id: + type: integer + validation: + min: 1 + source: + openapi: openapi/openapi.yaml ProjectReimport: properties: annotation_count: @@ -6016,6 +6028,7 @@ types: type: optional docs: flag to require comment on skip review_settings: optional + show_unused_data_columns_to_annotators: optional tags: optional updated_at: datetime source: @@ -6044,6 +6057,7 @@ types: type: optional docs: flag to require comment on skip review_settings: optional + show_unused_data_columns_to_annotators: optional tags: optional source: openapi: openapi/openapi.yaml @@ -6369,6 +6383,11 @@ types: show_instruction: type: optional docs: Show instructions to the reviewers before they start + show_unused_data_columns_to_reviewers: + type: optional + docs: >- + If true, Data Manager shows all task.data columns to reviewers; if + false, hides columns not referenced by the label interface source: openapi: openapi/openapi.yaml ReviewSettingsRequestRequeueRejectedTasksMode: @@ -6441,6 +6460,11 @@ types: show_instruction: type: optional docs: Show instructions to the reviewers before they start + show_unused_data_columns_to_reviewers: + type: optional + docs: >- + If true, Data Manager shows all task.data columns to reviewers; if + false, hides columns not referenced by the label interface source: openapi: openapi/openapi.yaml ReviewedEnum: diff --git a/.mock/definition/projectTemplates.yml b/.mock/definition/projectTemplates.yml index 5e0cd13c3..6c9beb7cf 100644 --- a/.mock/definition/projectTemplates.yml +++ b/.mock/definition/projectTemplates.yml @@ -38,6 +38,7 @@ service: require_comment_on_skip: true review_settings: key: value + show_unused_data_columns_to_annotators: true tags: key: value updated_at: '2024-01-15T09:30:00Z' @@ -74,6 +75,7 @@ service: require_comment_on_skip: true review_settings: key: value + show_unused_data_columns_to_annotators: true tags: key: value updated_at: '2024-01-15T09:30:00Z' @@ -109,6 +111,7 @@ service: require_comment_on_skip: true review_settings: key: value + show_unused_data_columns_to_annotators: true tags: key: value updated_at: '2024-01-15T09:30:00Z' @@ -149,6 +152,7 @@ service: require_comment_on_skip: true review_settings: key: value + show_unused_data_columns_to_annotators: true tags: key: value updated_at: '2024-01-15T09:30:00Z' @@ -203,6 +207,7 @@ service: type: optional docs: flag to require comment on skip review_settings: optional + show_unused_data_columns_to_annotators: optional tags: optional content-type: application/json response: @@ -228,6 +233,7 @@ service: require_comment_on_skip: true review_settings: key: value + show_unused_data_columns_to_annotators: true tags: key: value updated_at: '2024-01-15T09:30:00Z' @@ -339,6 +345,7 @@ service: show_agreement_to_reviewers: true show_data_manager_to_reviewers: true show_instruction: true + show_unused_data_columns_to_reviewers: true reviewer_queue_total: reviewer_queue_total sampling: Sequential sampling show_annotation_history: true @@ -347,6 +354,7 @@ service: show_instruction: true show_overlap_first: true show_skip_button: true + show_unused_data_columns_to_annotators: true skip_queue: REQUEUE_FOR_ME skipped_annotations_number: 1 start_training_on_annotation_update: true diff --git a/.mock/definition/projects.yml b/.mock/definition/projects.yml index 5e19a4dac..164ec9183 100644 --- a/.mock/definition/projects.yml +++ b/.mock/definition/projects.yml @@ -237,6 +237,7 @@ service: show_instruction: true show_overlap_first: true show_skip_button: true + show_unused_data_columns_to_annotators: true skip_queue: REQUEUE_FOR_ME skipped_annotations_number: skipped_annotations_number start_training_on_annotation_update: true @@ -695,6 +696,7 @@ service: docs: >- Show a skip button in interface and allow annotators to skip the task + show_unused_data_columns_to_annotators: optional skip_queue: optional task_data_login: type: optional @@ -785,6 +787,7 @@ service: show_agreement_to_reviewers: true show_data_manager_to_reviewers: true show_instruction: true + show_unused_data_columns_to_reviewers: true sampling: Sequential sampling show_annotation_history: true show_collab_predictions: true @@ -792,6 +795,7 @@ service: show_instruction: true show_overlap_first: true show_skip_button: true + show_unused_data_columns_to_annotators: true skip_queue: REQUEUE_FOR_ME skipped_annotations_number: 1 start_training_on_annotation_update: true diff --git a/.mock/definition/projects/members/bulk.yml b/.mock/definition/projects/members/bulk.yml index 3a4ba1cb2..b1e984044 100644 --- a/.mock/definition/projects/members/bulk.yml +++ b/.mock/definition/projects/members/bulk.yml @@ -1,3 +1,5 @@ +imports: + root: ../../__package__.yml types: BulkPostResponse: properties: @@ -25,11 +27,18 @@ service: display-name: Bulk assign project members request: name: ProjectMemberBulkAssignRequest + query-parameters: + search: + type: optional + docs: >- + Search term for filtering members by name, email, or username. + Only when all=True. body: properties: all: boolean excluded: optional> included: optional> + roles: optional> content-type: application/json response: docs: '' @@ -56,6 +65,14 @@ service: path-parameters: id: integer display-name: Bulk unassign project members + request: + name: BulkDeleteRequest + query-parameters: + search: + type: optional + docs: >- + Search term for filtering members by name, email, or username. + Only when all=True. response: docs: '' type: BulkDeleteResponse diff --git a/.mock/definition/prompts.yml b/.mock/definition/prompts.yml index 3a1b65c84..0e9fa15aa 100644 --- a/.mock/definition/prompts.yml +++ b/.mock/definition/prompts.yml @@ -272,6 +272,7 @@ service: show_instruction: true show_overlap_first: true show_skip_button: true + show_unused_data_columns_to_annotators: true skip_queue: REQUEUE_FOR_ME skipped_annotations_number: skipped_annotations_number start_training_on_annotation_update: true diff --git a/.mock/definition/stats.yml b/.mock/definition/stats.yml index 144fe8371..f8d3fc6d6 100644 --- a/.mock/definition/stats.yml +++ b/.mock/definition/stats.yml @@ -140,13 +140,23 @@ service: method: GET auth: true docs: >- - Mean agreement of annotator annotations vs predictions for a specific - model version. + Mean agreement between the given model version and all other model + versions in the project. - Mirrors prediction_per_user_agreement but filtered by - prediction.model_version. - :return: {"average_prediction_agreement_per_model": float[0..1]} + Computed as the average of pairwise model-to-model agreement scores from + PredictionPairStats where either + + prediction pair's model_version_from or model_version_to equals the + provided model_version. + + + When per_label=true, returns a mapping of label -> average agreement + across the same set of pairs. + + + :return: {"average_prediction_agreement_per_model": float[0..1] | + {label: float[0..1]}} source: openapi: openapi/openapi.yaml path-parameters: diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 20546dde3..fd6350476 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -7386,6 +7386,11 @@ paths: required: true schema: type: integer + - description: Search term for filtering members by name, email, or username. Only when all=True. + in: query + name: search + schema: + type: string responses: '200': content: @@ -7417,6 +7422,11 @@ paths: required: true schema: type: integer + - description: Search term for filtering members by name, email, or username. Only when all=True. + in: query + name: search + schema: + type: string requestBody: content: application/json: @@ -7664,9 +7674,14 @@ paths: /api/projects/{id}/model-stats/{model_version}/prediction: get: description: |- - Mean agreement of annotator annotations vs predictions for a specific model version. - Mirrors prediction_per_user_agreement but filtered by prediction.model_version. - :return: {"average_prediction_agreement_per_model": float[0..1]} + Mean agreement between the given model version and all other model versions in the project. + + Computed as the average of pairwise model-to-model agreement scores from PredictionPairStats where either + prediction pair's model_version_from or model_version_to equals the provided model_version. + + When per_label=true, returns a mapping of label -> average agreement across the same set of pairs. + + :return: {"average_prediction_agreement_per_model": float[0..1] | {label: float[0..1]}} operationId: api_projects_model_stats_prediction_retrieve parameters: - in: path @@ -16401,6 +16416,9 @@ components: show_skip_button: description: Show a skip button in interface and allow annotators to skip the task type: boolean + show_unused_data_columns_to_annotators: + nullable: true + type: boolean skip_queue: nullable: true oneOf: @@ -20673,6 +20691,9 @@ components: show_skip_button: description: Show a skip button in interface and allow annotators to skip the task type: boolean + show_unused_data_columns_to_annotators: + nullable: true + type: boolean skip_queue: nullable: true oneOf: @@ -21314,6 +21335,9 @@ components: show_skip_button: description: Show a skip button in interface and allow annotators to skip the task type: boolean + show_unused_data_columns_to_annotators: + nullable: true + type: boolean skip_queue: nullable: true oneOf: @@ -24734,6 +24758,9 @@ components: show_skip_button: description: Show a skip button in interface and allow annotators to skip the task type: boolean + show_unused_data_columns_to_annotators: + nullable: true + type: boolean skip_queue: nullable: true oneOf: @@ -25218,6 +25245,9 @@ components: type: boolean review_settings: description: general dict serialized review settings + show_unused_data_columns_to_annotators: + nullable: true + type: boolean tags: {} type: object PatchedS3DatasetStorageRequest: @@ -26012,9 +26042,24 @@ components: minimum: 1 type: integer type: array + roles: + items: + $ref: '#/components/schemas/ProjectMemberBulkAssignRolesRequest' + type: array required: - all type: object + ProjectMemberBulkAssignRolesRequest: + properties: + role: + $ref: '#/components/schemas/Role9e7Enum' + user_id: + minimum: 1 + type: integer + required: + - role + - user_id + type: object ProjectMemberRequest: properties: user: @@ -26287,6 +26332,9 @@ components: type: boolean review_settings: description: general dict serialized review settings + show_unused_data_columns_to_annotators: + nullable: true + type: boolean tags: {} updated_at: format: date-time @@ -26328,6 +26376,9 @@ components: type: boolean review_settings: description: general dict serialized review settings + show_unused_data_columns_to_annotators: + nullable: true + type: boolean tags: {} required: - name @@ -26696,6 +26747,10 @@ components: show_instruction: description: Show instructions to the reviewers before they start type: boolean + show_unused_data_columns_to_reviewers: + description: If true, Data Manager shows all task.data columns to reviewers; if false, hides columns not referenced by the label interface + nullable: true + type: boolean required: - id - requeue_rejected_tasks_to_annotator @@ -26752,6 +26807,10 @@ components: show_instruction: description: Show instructions to the reviewers before they start type: boolean + show_unused_data_columns_to_reviewers: + description: If true, Data Manager shows all task.data columns to reviewers; if false, hides columns not referenced by the label interface + nullable: true + type: boolean type: object ReviewedEnum: description: |- diff --git a/reference.md b/reference.md index da79d6a2c..1c3408e0e 100644 --- a/reference.md +++ b/reference.md @@ -7477,6 +7477,14 @@ client.projects.update(
+**show_unused_data_columns_to_annotators:** `typing.Optional[bool]` + +
+
+ +
+
+ **skip_queue:** `typing.Optional[PatchedLseProjectUpdateRequestSkipQueue]`
@@ -21880,6 +21888,14 @@ client.projects.members.bulk.post(
+**search:** `typing.Optional[str]` — Search term for filtering members by name, email, or username. Only when all=True. + +
+
+ +
+
+ **excluded:** `typing.Optional[typing.Sequence[int]]`
@@ -21896,6 +21912,14 @@ client.projects.members.bulk.post(
+**roles:** `typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]]` + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -21966,6 +21990,14 @@ client.projects.members.bulk.delete(
+**search:** `typing.Optional[str]` — Search term for filtering members by name, email, or username. Only when all=True. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/label_studio_sdk/__init__.py b/src/label_studio_sdk/__init__.py index 753a8818e..2ed0410ed 100644 --- a/src/label_studio_sdk/__init__.py +++ b/src/label_studio_sdk/__init__.py @@ -135,6 +135,7 @@ ProjectImport, ProjectLabelConfig, ProjectLabelConfigRequest, + ProjectMemberBulkAssignRolesRequest, ProjectSampling, ProjectSkipQueue, ProjectSubsetEnum, @@ -472,6 +473,7 @@ "ProjectImport", "ProjectLabelConfig", "ProjectLabelConfigRequest", + "ProjectMemberBulkAssignRolesRequest", "ProjectSampling", "ProjectSkipQueue", "ProjectSubsetEnum", diff --git a/src/label_studio_sdk/projects/client.py b/src/label_studio_sdk/projects/client.py index bbedcecc3..d26c2207c 100644 --- a/src/label_studio_sdk/projects/client.py +++ b/src/label_studio_sdk/projects/client.py @@ -490,6 +490,7 @@ def update( show_instruction: typing.Optional[bool] = OMIT, show_overlap_first: typing.Optional[bool] = OMIT, show_skip_button: typing.Optional[bool] = OMIT, + show_unused_data_columns_to_annotators: typing.Optional[bool] = OMIT, skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT, task_data_login: typing.Optional[str] = OMIT, task_data_password: typing.Optional[str] = OMIT, @@ -592,6 +593,8 @@ def update( show_skip_button : typing.Optional[bool] Show a skip button in interface and allow annotators to skip the task + show_unused_data_columns_to_annotators : typing.Optional[bool] + skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] task_data_login : typing.Optional[str] @@ -671,6 +674,7 @@ def update( "show_instruction": show_instruction, "show_overlap_first": show_overlap_first, "show_skip_button": show_skip_button, + "show_unused_data_columns_to_annotators": show_unused_data_columns_to_annotators, "skip_queue": convert_and_respect_annotation_metadata( object_=skip_queue, annotation=PatchedLseProjectUpdateRequestSkipQueue, direction="write" ), @@ -1452,6 +1456,7 @@ async def update( show_instruction: typing.Optional[bool] = OMIT, show_overlap_first: typing.Optional[bool] = OMIT, show_skip_button: typing.Optional[bool] = OMIT, + show_unused_data_columns_to_annotators: typing.Optional[bool] = OMIT, skip_queue: typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] = OMIT, task_data_login: typing.Optional[str] = OMIT, task_data_password: typing.Optional[str] = OMIT, @@ -1554,6 +1559,8 @@ async def update( show_skip_button : typing.Optional[bool] Show a skip button in interface and allow annotators to skip the task + show_unused_data_columns_to_annotators : typing.Optional[bool] + skip_queue : typing.Optional[PatchedLseProjectUpdateRequestSkipQueue] task_data_login : typing.Optional[str] @@ -1641,6 +1648,7 @@ async def main() -> None: "show_instruction": show_instruction, "show_overlap_first": show_overlap_first, "show_skip_button": show_skip_button, + "show_unused_data_columns_to_annotators": show_unused_data_columns_to_annotators, "skip_queue": convert_and_respect_annotation_metadata( object_=skip_queue, annotation=PatchedLseProjectUpdateRequestSkipQueue, direction="write" ), diff --git a/src/label_studio_sdk/projects/members/bulk/client.py b/src/label_studio_sdk/projects/members/bulk/client.py index 88a12b94a..c09ba179a 100644 --- a/src/label_studio_sdk/projects/members/bulk/client.py +++ b/src/label_studio_sdk/projects/members/bulk/client.py @@ -2,9 +2,11 @@ import typing from ....core.client_wrapper import SyncClientWrapper +from ....types.project_member_bulk_assign_roles_request import ProjectMemberBulkAssignRolesRequest from ....core.request_options import RequestOptions from .types.bulk_post_response import BulkPostResponse from ....core.jsonable_encoder import jsonable_encoder +from ....core.serialization import convert_and_respect_annotation_metadata from ....core.unchecked_base_model import construct_type from json.decoder import JSONDecodeError from ....core.api_error import ApiError @@ -24,8 +26,10 @@ def post( id: int, *, all_: bool, + search: typing.Optional[str] = None, excluded: typing.Optional[typing.Sequence[int]] = OMIT, included: typing.Optional[typing.Sequence[int]] = OMIT, + roles: typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> BulkPostResponse: """ @@ -37,10 +41,15 @@ def post( all_ : bool + search : typing.Optional[str] + Search term for filtering members by name, email, or username. Only when all=True. + excluded : typing.Optional[typing.Sequence[int]] included : typing.Optional[typing.Sequence[int]] + roles : typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -64,10 +73,16 @@ def post( _response = self._client_wrapper.httpx_client.request( f"api/projects/{jsonable_encoder(id)}/members/bulk/", method="POST", + params={ + "search": search, + }, json={ "all": all_, "excluded": excluded, "included": included, + "roles": convert_and_respect_annotation_metadata( + object_=roles, annotation=typing.Sequence[ProjectMemberBulkAssignRolesRequest], direction="write" + ), }, headers={ "content-type": "application/json", @@ -89,7 +104,9 @@ def post( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BulkDeleteResponse: + def delete( + self, id: int, *, search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> BulkDeleteResponse: """ Unassign project members in bulk. Allows the same request body as bulk assign. @@ -97,6 +114,9 @@ def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = ---------- id : int + search : typing.Optional[str] + Search term for filtering members by name, email, or username. Only when all=True. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -119,6 +139,9 @@ def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = _response = self._client_wrapper.httpx_client.request( f"api/projects/{jsonable_encoder(id)}/members/bulk/", method="DELETE", + params={ + "search": search, + }, request_options=request_options, ) try: @@ -145,8 +168,10 @@ async def post( id: int, *, all_: bool, + search: typing.Optional[str] = None, excluded: typing.Optional[typing.Sequence[int]] = OMIT, included: typing.Optional[typing.Sequence[int]] = OMIT, + roles: typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> BulkPostResponse: """ @@ -158,10 +183,15 @@ async def post( all_ : bool + search : typing.Optional[str] + Search term for filtering members by name, email, or username. Only when all=True. + excluded : typing.Optional[typing.Sequence[int]] included : typing.Optional[typing.Sequence[int]] + roles : typing.Optional[typing.Sequence[ProjectMemberBulkAssignRolesRequest]] + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -193,10 +223,16 @@ async def main() -> None: _response = await self._client_wrapper.httpx_client.request( f"api/projects/{jsonable_encoder(id)}/members/bulk/", method="POST", + params={ + "search": search, + }, json={ "all": all_, "excluded": excluded, "included": included, + "roles": convert_and_respect_annotation_metadata( + object_=roles, annotation=typing.Sequence[ProjectMemberBulkAssignRolesRequest], direction="write" + ), }, headers={ "content-type": "application/json", @@ -218,7 +254,9 @@ async def main() -> None: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BulkDeleteResponse: + async def delete( + self, id: int, *, search: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> BulkDeleteResponse: """ Unassign project members in bulk. Allows the same request body as bulk assign. @@ -226,6 +264,9 @@ async def delete(self, id: int, *, request_options: typing.Optional[RequestOptio ---------- id : int + search : typing.Optional[str] + Search term for filtering members by name, email, or username. Only when all=True. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -256,6 +297,9 @@ async def main() -> None: _response = await self._client_wrapper.httpx_client.request( f"api/projects/{jsonable_encoder(id)}/members/bulk/", method="DELETE", + params={ + "search": search, + }, request_options=request_options, ) try: diff --git a/src/label_studio_sdk/types/__init__.py b/src/label_studio_sdk/types/__init__.py index 5fe25a5f9..4b47e1323 100644 --- a/src/label_studio_sdk/types/__init__.py +++ b/src/label_studio_sdk/types/__init__.py @@ -136,6 +136,7 @@ from .project_import import ProjectImport from .project_label_config import ProjectLabelConfig from .project_label_config_request import ProjectLabelConfigRequest +from .project_member_bulk_assign_roles_request import ProjectMemberBulkAssignRolesRequest from .project_sampling import ProjectSampling from .project_skip_queue import ProjectSkipQueue from .project_subset_enum import ProjectSubsetEnum @@ -331,6 +332,7 @@ "ProjectImport", "ProjectLabelConfig", "ProjectLabelConfigRequest", + "ProjectMemberBulkAssignRolesRequest", "ProjectSampling", "ProjectSkipQueue", "ProjectSubsetEnum", diff --git a/src/label_studio_sdk/types/all_roles_project_list.py b/src/label_studio_sdk/types/all_roles_project_list.py index 17eee5c24..c229db31f 100644 --- a/src/label_studio_sdk/types/all_roles_project_list.py +++ b/src/label_studio_sdk/types/all_roles_project_list.py @@ -164,6 +164,7 @@ class AllRolesProjectList(UncheckedBaseModel): Show a skip button in interface and allow annotators to skip the task """ + show_unused_data_columns_to_annotators: typing.Optional[bool] = None skip_queue: typing.Optional[AllRolesProjectListSkipQueue] = None skipped_annotations_number: str start_training_on_annotation_update: bool = pydantic.Field() diff --git a/src/label_studio_sdk/types/lse_project_update.py b/src/label_studio_sdk/types/lse_project_update.py index 66e60f4eb..2f7417a74 100644 --- a/src/label_studio_sdk/types/lse_project_update.py +++ b/src/label_studio_sdk/types/lse_project_update.py @@ -156,6 +156,7 @@ class LseProjectUpdate(UncheckedBaseModel): Show a skip button in interface and allow annotators to skip the task """ + show_unused_data_columns_to_annotators: typing.Optional[bool] = None skip_queue: typing.Optional[LseProjectUpdateSkipQueue] = None skipped_annotations_number: int = pydantic.Field() """ diff --git a/src/label_studio_sdk/types/project_member_bulk_assign_roles_request.py b/src/label_studio_sdk/types/project_member_bulk_assign_roles_request.py new file mode 100644 index 000000000..2f4137ba1 --- /dev/null +++ b/src/label_studio_sdk/types/project_member_bulk_assign_roles_request.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +from ..core.unchecked_base_model import UncheckedBaseModel +from .role9e7enum import Role9E7Enum +from ..core.pydantic_utilities import IS_PYDANTIC_V2 +import typing +import pydantic + + +class ProjectMemberBulkAssignRolesRequest(UncheckedBaseModel): + role: Role9E7Enum + user_id: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/label_studio_sdk/types/review_settings.py b/src/label_studio_sdk/types/review_settings.py index f1ccd30eb..9ccfd0605 100644 --- a/src/label_studio_sdk/types/review_settings.py +++ b/src/label_studio_sdk/types/review_settings.py @@ -69,6 +69,11 @@ class ReviewSettings(UncheckedBaseModel): Show instructions to the reviewers before they start """ + show_unused_data_columns_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, Data Manager shows all task.data columns to reviewers; if false, hides columns not referenced by the label interface + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/label_studio_sdk/types/review_settings_request.py b/src/label_studio_sdk/types/review_settings_request.py index 426d40542..e42a24869 100644 --- a/src/label_studio_sdk/types/review_settings_request.py +++ b/src/label_studio_sdk/types/review_settings_request.py @@ -69,6 +69,11 @@ class ReviewSettingsRequest(UncheckedBaseModel): Show instructions to the reviewers before they start """ + show_unused_data_columns_to_reviewers: typing.Optional[bool] = pydantic.Field(default=None) + """ + If true, Data Manager shows all task.data columns to reviewers; if false, hides columns not referenced by the label interface + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/tests/test_projects.py b/tests/test_projects.py index 28cb28d76..cc1f3c3be 100644 --- a/tests/test_projects.py +++ b/tests/test_projects.py @@ -293,6 +293,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "show_agreement_to_reviewers": True, "show_data_manager_to_reviewers": True, "show_instruction": True, + "show_unused_data_columns_to_reviewers": True, }, "sampling": "Sequential sampling", "show_annotation_history": True, @@ -301,6 +302,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "show_instruction": True, "show_overlap_first": True, "show_skip_button": True, + "show_unused_data_columns_to_annotators": True, "skip_queue": "REQUEUE_FOR_ME", "skipped_annotations_number": 1, "start_training_on_annotation_update": True, @@ -367,6 +369,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "show_agreement_to_reviewers": None, "show_data_manager_to_reviewers": None, "show_instruction": None, + "show_unused_data_columns_to_reviewers": None, }, "sampling": None, "show_annotation_history": None, @@ -375,6 +378,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "show_instruction": None, "show_overlap_first": None, "show_skip_button": None, + "show_unused_data_columns_to_annotators": None, "skip_queue": None, "skipped_annotations_number": "integer", "start_training_on_annotation_update": None, diff --git a/tests/test_prompts.py b/tests/test_prompts.py index 088083b63..bb39ee8f6 100644 --- a/tests/test_prompts.py +++ b/tests/test_prompts.py @@ -183,6 +183,7 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel "show_instruction": True, "show_overlap_first": True, "show_skip_button": True, + "show_unused_data_columns_to_annotators": True, "skip_queue": "REQUEUE_FOR_ME", "skipped_annotations_number": "skipped_annotations_number", "start_training_on_annotation_update": True, @@ -268,6 +269,7 @@ async def test_compatible_projects(client: LabelStudio, async_client: AsyncLabel "show_instruction": None, "show_overlap_first": None, "show_skip_button": None, + "show_unused_data_columns_to_annotators": None, "skip_queue": None, "skipped_annotations_number": None, "start_training_on_annotation_update": None,