diff --git a/.mock/definition/__package__.yml b/.mock/definition/__package__.yml index 96876c561..23b5c85fd 100644 --- a/.mock/definition/__package__.yml +++ b/.mock/definition/__package__.yml @@ -1249,9 +1249,6 @@ types: project: type: integer docs: A unique integer value identifying this project. - recursive_scan: - type: optional - docs: Perform recursive scan regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -1328,9 +1325,6 @@ types: project: type: integer docs: A unique integer value identifying this project. - recursive_scan: - type: optional - docs: Perform recursive scan regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -5189,7 +5183,10 @@ types: validation: maxLength: 256 lse_fields: LseFields - org_membership: list + org_membership: + type: list + availability: deprecated + organization_membership: OrganizationMembership pause: string phone: type: optional @@ -5234,7 +5231,10 @@ types: type: optional validation: maxLength: 256 - org_membership: list + org_membership: + type: list + availability: deprecated + organization_membership: OrganizationMembership phone: type: optional validation: @@ -5891,7 +5891,10 @@ types: validation: maxLength: 256 lse_fields: LseFields - org_membership: list + org_membership: + type: list + availability: deprecated + organization_membership: OrganizationMembership pause: string phone: type: optional @@ -7957,7 +7960,10 @@ types: validation: maxLength: 256 lse_fields: WhoAmILseFields - org_membership: list + org_membership: + type: list + availability: deprecated + organization_membership: OrganizationMembership pause: string permissions: list phone: diff --git a/.mock/definition/importStorage/azureSpi.yml b/.mock/definition/importStorage/azureSpi.yml index 7ae699522..f88cad861 100644 --- a/.mock/definition/importStorage/azureSpi.yml +++ b/.mock/definition/importStorage/azureSpi.yml @@ -45,7 +45,6 @@ service: presign: true presign_ttl: 1 project: 1 - recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -92,7 +91,6 @@ service: presign: true presign_ttl: 1 project: 1 - recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -158,7 +156,6 @@ service: presign: true presign_ttl: 1 project: 1 - recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -248,9 +245,6 @@ service: project: type: optional docs: A unique integer value identifying this project. - recursive_scan: - type: optional - docs: Perform recursive scan regex_filter: type: optional docs: Cloud storage regex for filtering objects @@ -301,7 +295,6 @@ service: presign: true presign_ttl: 1 project: 1 - recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true @@ -349,7 +342,6 @@ service: presign: true presign_ttl: 1 project: 1 - recursive_scan: true regex_filter: regex_filter status: initialized synchronizable: true diff --git a/.mock/definition/projects/members.yml b/.mock/definition/projects/members.yml index 18cf1eb9b..28a690e28 100644 --- a/.mock/definition/projects/members.yml +++ b/.mock/definition/projects/members.yml @@ -63,6 +63,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone username: username diff --git a/.mock/definition/projects/members/paginated.yml b/.mock/definition/projects/members/paginated.yml index 0e94dad81..8c58997d0 100644 --- a/.mock/definition/projects/members/paginated.yml +++ b/.mock/definition/projects/members/paginated.yml @@ -76,6 +76,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone project_role: project_role diff --git a/.mock/definition/prompts/versions.yml b/.mock/definition/prompts/versions.yml index 95119f0fa..da6eafc7e 100644 --- a/.mock/definition/prompts/versions.yml +++ b/.mock/definition/prompts/versions.yml @@ -33,12 +33,19 @@ service: ordering: type: optional docs: Which field to use when ordering the results. + prompt_id: + type: integer + docs: >- + A unique integer value identifying the model ID to list versions + for. response: docs: '' type: list examples: - path-parameters: prompt_id: 1 + query-parameters: + prompt_id: 1 response: body: - created_at: '2024-01-15T09:30:00Z' diff --git a/.mock/definition/users.yml b/.mock/definition/users.yml index 6ab21bb9f..e39a8f8c0 100644 --- a/.mock/definition/users.yml +++ b/.mock/definition/users.yml @@ -35,6 +35,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role phone: phone username: username audiences: @@ -109,6 +113,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role phone: phone username: username audiences: @@ -236,6 +244,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause permissions: - permissions @@ -280,6 +292,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role phone: phone username: username audiences: @@ -362,6 +378,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone username: username @@ -418,6 +438,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone username: username @@ -535,6 +559,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone username: username diff --git a/.mock/definition/workspaces/members.yml b/.mock/definition/workspaces/members.yml index f48b32497..f6040d58a 100644 --- a/.mock/definition/workspaces/members.yml +++ b/.mock/definition/workspaces/members.yml @@ -44,6 +44,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone username: username diff --git a/.mock/definition/workspaces/members/paginated.yml b/.mock/definition/workspaces/members/paginated.yml index a1b4e8da2..eed953f6d 100644 --- a/.mock/definition/workspaces/members/paginated.yml +++ b/.mock/definition/workspaces/members/paginated.yml @@ -65,6 +65,10 @@ service: - active: active organization_id: 1 role: role + organization_membership: + active: active + organization_id: 1 + role: role pause: pause phone: phone username: username diff --git a/.mock/openapi/openapi.yaml b/.mock/openapi/openapi.yaml index 26d1f5dcb..5edf09d63 100644 --- a/.mock/openapi/openapi.yaml +++ b/.mock/openapi/openapi.yaml @@ -10058,6 +10058,12 @@ paths: required: true schema: type: integer + - description: A unique integer value identifying the model ID to list versions for. + in: query + name: prompt_id + required: true + schema: + type: integer responses: '200': content: @@ -18885,10 +18891,6 @@ components: project: description: A unique integer value identifying this project. type: integer - recursive_scan: - description: Perform recursive scan - nullable: true - type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -18984,10 +18986,6 @@ components: project: description: A unique integer value identifying this project. type: integer - recursive_scan: - description: Perform recursive scan - nullable: true - type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -24336,10 +24334,15 @@ components: - $ref: '#/components/schemas/LseFields' readOnly: true org_membership: + deprecated: true items: $ref: '#/components/schemas/OrganizationMembership' readOnly: true type: array + organization_membership: + allOf: + - $ref: '#/components/schemas/OrganizationMembership' + readOnly: true pause: readOnly: true type: string @@ -24357,6 +24360,7 @@ components: - last_activity - lse_fields - org_membership + - organization_membership - pause - username type: object @@ -24409,10 +24413,15 @@ components: maxLength: 256 type: string org_membership: + deprecated: true items: $ref: '#/components/schemas/OrganizationMembership' readOnly: true type: array + organization_membership: + allOf: + - $ref: '#/components/schemas/OrganizationMembership' + readOnly: true phone: maxLength: 256 type: string @@ -24426,6 +24435,7 @@ components: - initials - last_activity - org_membership + - organization_membership - username type: object LseUserOrganizationMemberList: @@ -25499,10 +25509,15 @@ components: - $ref: '#/components/schemas/LseFields' readOnly: true org_membership: + deprecated: true items: $ref: '#/components/schemas/OrganizationMembership' readOnly: true type: array + organization_membership: + allOf: + - $ref: '#/components/schemas/OrganizationMembership' + readOnly: true pause: readOnly: true type: string @@ -25523,6 +25538,7 @@ components: - last_activity - lse_fields - org_membership + - organization_membership - pause - project_role - username @@ -25801,10 +25817,6 @@ components: project: description: A unique integer value identifying this project. type: integer - recursive_scan: - description: Perform recursive scan - nullable: true - type: boolean regex_filter: description: Cloud storage regex for filtering objects nullable: true @@ -30346,10 +30358,15 @@ components: - $ref: '#/components/schemas/WhoAmILseFields' readOnly: true org_membership: + deprecated: true items: $ref: '#/components/schemas/OrganizationMembership' readOnly: true type: array + organization_membership: + allOf: + - $ref: '#/components/schemas/OrganizationMembership' + readOnly: true pause: readOnly: true type: string @@ -30372,6 +30389,7 @@ components: - last_activity - lse_fields - org_membership + - organization_membership - pause - permissions - username diff --git a/pyproject.toml b/pyproject.toml index 06b82fdcf..faa6b2026 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "label-studio-sdk" [tool.poetry] name = "label-studio-sdk" -version = "2.0.9.dev" +version = "2.0.9" description = "" readme = "README.md" authors = [] diff --git a/reference.md b/reference.md index 53cf6dd37..3ef779234 100644 --- a/reference.md +++ b/reference.md @@ -20072,14 +20072,6 @@ client.import_storage.azure_spi.create(
-**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan - -
-
- -
-
- **regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
@@ -20310,14 +20302,6 @@ client.import_storage.azure_spi.validate(
-**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan - -
-
- -
-
- **regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
@@ -20696,14 +20680,6 @@ client.import_storage.azure_spi.update(
-**recursive_scan:** `typing.Optional[bool]` — Perform recursive scan - -
-
- -
-
- **regex_filter:** `typing.Optional[str]` — Cloud storage regex for filtering objects
@@ -30571,6 +30547,7 @@ client = LabelStudio( api_key="YOUR_API_KEY", ) client.prompts.versions.list( + prompt_id_=1, prompt_id=1, ) @@ -30588,7 +30565,15 @@ client.prompts.versions.list(
-**prompt_id:** `int` +**prompt_id_:** `int` + +
+
+ +
+
+ +**prompt_id:** `int` — A unique integer value identifying the model ID to list versions for.
diff --git a/src/label_studio_sdk/import_storage/azure_spi/client.py b/src/label_studio_sdk/import_storage/azure_spi/client.py index e941444dc..2dcc6a22d 100644 --- a/src/label_studio_sdk/import_storage/azure_spi/client.py +++ b/src/label_studio_sdk/import_storage/azure_spi/client.py @@ -94,7 +94,6 @@ def create( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -147,9 +146,6 @@ def create( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) - recursive_scan : typing.Optional[bool] - Perform recursive scan - regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -208,7 +204,6 @@ def create( "presign": presign, "presign_ttl": presign_ttl, "project": project, - "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -251,7 +246,6 @@ def validate( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -304,9 +298,6 @@ def validate( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) - recursive_scan : typing.Optional[bool] - Perform recursive scan - regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -364,7 +355,6 @@ def validate( "presign": presign, "presign_ttl": presign_ttl, "project": project, - "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -489,7 +479,6 @@ def update( presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, project: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -544,9 +533,6 @@ def update( project : typing.Optional[int] A unique integer value identifying this project. - recursive_scan : typing.Optional[bool] - Perform recursive scan - regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -605,7 +591,6 @@ def update( "presign": presign, "presign_ttl": presign_ttl, "project": project, - "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -770,7 +755,6 @@ async def create( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -823,9 +807,6 @@ async def create( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) - recursive_scan : typing.Optional[bool] - Perform recursive scan - regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -892,7 +873,6 @@ async def main() -> None: "presign": presign, "presign_ttl": presign_ttl, "project": project, - "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -935,7 +915,6 @@ async def validate( prefix: typing.Optional[str] = OMIT, presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -988,9 +967,6 @@ async def validate( presign_ttl : typing.Optional[int] Presigned URLs TTL (in minutes) - recursive_scan : typing.Optional[bool] - Perform recursive scan - regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -1056,7 +1032,6 @@ async def main() -> None: "presign": presign, "presign_ttl": presign_ttl, "project": project, - "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, @@ -1197,7 +1172,6 @@ async def update( presign: typing.Optional[bool] = OMIT, presign_ttl: typing.Optional[int] = OMIT, project: typing.Optional[int] = OMIT, - recursive_scan: typing.Optional[bool] = OMIT, regex_filter: typing.Optional[str] = OMIT, status: typing.Optional[StatusC5AEnum] = OMIT, synchronizable: typing.Optional[bool] = OMIT, @@ -1252,9 +1226,6 @@ async def update( project : typing.Optional[int] A unique integer value identifying this project. - recursive_scan : typing.Optional[bool] - Perform recursive scan - regex_filter : typing.Optional[str] Cloud storage regex for filtering objects @@ -1321,7 +1292,6 @@ async def main() -> None: "presign": presign, "presign_ttl": presign_ttl, "project": project, - "recursive_scan": recursive_scan, "regex_filter": regex_filter, "status": status, "synchronizable": synchronizable, diff --git a/src/label_studio_sdk/prompts/versions/client.py b/src/label_studio_sdk/prompts/versions/client.py index 0185ec11a..641b8b08d 100644 --- a/src/label_studio_sdk/prompts/versions/client.py +++ b/src/label_studio_sdk/prompts/versions/client.py @@ -62,8 +62,9 @@ def get_default_version_name(self, id: int, *, request_options: typing.Optional[ def list( self, - prompt_id: int, + prompt_id_: int, *, + prompt_id: int, ordering: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[ThirdPartyModelVersion]: @@ -72,7 +73,10 @@ def list( Parameters ---------- + prompt_id_ : int + prompt_id : int + A unique integer value identifying the model ID to list versions for. ordering : typing.Optional[str] Which field to use when ordering the results. @@ -93,14 +97,16 @@ def list( api_key="YOUR_API_KEY", ) client.prompts.versions.list( + prompt_id_=1, prompt_id=1, ) """ _response = self._client_wrapper.httpx_client.request( - f"api/prompts/{jsonable_encoder(prompt_id)}/versions", + f"api/prompts/{jsonable_encoder(prompt_id_)}/versions", method="GET", params={ "ordering": ordering, + "prompt_id": prompt_id, }, request_options=request_options, ) @@ -668,8 +674,9 @@ async def main() -> None: async def list( self, - prompt_id: int, + prompt_id_: int, *, + prompt_id: int, ordering: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, ) -> typing.List[ThirdPartyModelVersion]: @@ -678,7 +685,10 @@ async def list( Parameters ---------- + prompt_id_ : int + prompt_id : int + A unique integer value identifying the model ID to list versions for. ordering : typing.Optional[str] Which field to use when ordering the results. @@ -704,6 +714,7 @@ async def list( async def main() -> None: await client.prompts.versions.list( + prompt_id_=1, prompt_id=1, ) @@ -711,10 +722,11 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._client_wrapper.httpx_client.request( - f"api/prompts/{jsonable_encoder(prompt_id)}/versions", + f"api/prompts/{jsonable_encoder(prompt_id_)}/versions", method="GET", params={ "ordering": ordering, + "prompt_id": prompt_id, }, request_options=request_options, ) diff --git a/src/label_studio_sdk/types/azure_service_principal_import_storage.py b/src/label_studio_sdk/types/azure_service_principal_import_storage.py index b70c09bc7..72b915bbe 100644 --- a/src/label_studio_sdk/types/azure_service_principal_import_storage.py +++ b/src/label_studio_sdk/types/azure_service_principal_import_storage.py @@ -72,11 +72,6 @@ class AzureServicePrincipalImportStorage(UncheckedBaseModel): A unique integer value identifying this project. """ - recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) - """ - Perform recursive scan - """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Cloud storage regex for filtering objects diff --git a/src/label_studio_sdk/types/azure_service_principal_import_storage_request.py b/src/label_studio_sdk/types/azure_service_principal_import_storage_request.py index 626970cb6..ddf5ea445 100644 --- a/src/label_studio_sdk/types/azure_service_principal_import_storage_request.py +++ b/src/label_studio_sdk/types/azure_service_principal_import_storage_request.py @@ -66,11 +66,6 @@ class AzureServicePrincipalImportStorageRequest(UncheckedBaseModel): A unique integer value identifying this project. """ - recursive_scan: typing.Optional[bool] = pydantic.Field(default=None) - """ - Perform recursive scan - """ - regex_filter: typing.Optional[str] = pydantic.Field(default=None) """ Cloud storage regex for filtering objects diff --git a/src/label_studio_sdk/types/lse_user.py b/src/label_studio_sdk/types/lse_user.py index 5f146708c..b374650e2 100644 --- a/src/label_studio_sdk/types/lse_user.py +++ b/src/label_studio_sdk/types/lse_user.py @@ -35,6 +35,7 @@ class LseUser(UncheckedBaseModel): last_name: typing.Optional[str] = None lse_fields: LseFields org_membership: typing.List[OrganizationMembership] + organization_membership: OrganizationMembership pause: str phone: typing.Optional[str] = None username: str diff --git a/src/label_studio_sdk/types/lse_user_api.py b/src/label_studio_sdk/types/lse_user_api.py index b7ca5dd85..8ac956e36 100644 --- a/src/label_studio_sdk/types/lse_user_api.py +++ b/src/label_studio_sdk/types/lse_user_api.py @@ -33,6 +33,7 @@ class LseUserApi(UncheckedBaseModel): last_activity: dt.datetime last_name: typing.Optional[str] = None org_membership: typing.List[OrganizationMembership] + organization_membership: OrganizationMembership phone: typing.Optional[str] = None username: str diff --git a/src/label_studio_sdk/types/paginated_project_member.py b/src/label_studio_sdk/types/paginated_project_member.py index aaa72a4ed..5ae248237 100644 --- a/src/label_studio_sdk/types/paginated_project_member.py +++ b/src/label_studio_sdk/types/paginated_project_member.py @@ -35,6 +35,7 @@ class PaginatedProjectMember(UncheckedBaseModel): last_name: typing.Optional[str] = None lse_fields: LseFields org_membership: typing.List[OrganizationMembership] + organization_membership: OrganizationMembership pause: str phone: typing.Optional[str] = None project_role: str diff --git a/src/label_studio_sdk/types/who_am_i_user.py b/src/label_studio_sdk/types/who_am_i_user.py index cfc4138eb..91648ab49 100644 --- a/src/label_studio_sdk/types/who_am_i_user.py +++ b/src/label_studio_sdk/types/who_am_i_user.py @@ -35,6 +35,7 @@ class WhoAmIUser(UncheckedBaseModel): last_name: typing.Optional[str] = None lse_fields: WhoAmILseFields org_membership: typing.List[OrganizationMembership] + organization_membership: OrganizationMembership pause: str permissions: typing.List[str] phone: typing.Optional[str] = None diff --git a/tests/import_storage/test_azure_spi.py b/tests/import_storage/test_azure_spi.py index 71d9828cd..0a98ba502 100644 --- a/tests/import_storage/test_azure_spi.py +++ b/tests/import_storage/test_azure_spi.py @@ -24,7 +24,6 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": True, "presign_ttl": 1, "project": 1, - "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -55,7 +54,6 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "presign": None, "presign_ttl": "integer", "project": "integer", - "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -92,7 +90,6 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, - "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -119,7 +116,6 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", - "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -167,7 +163,6 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": True, "presign_ttl": 1, "project": 1, - "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -194,7 +189,6 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "presign": None, "presign_ttl": "integer", "project": "integer", - "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -242,7 +236,6 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": True, "presign_ttl": 1, "project": 1, - "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -269,7 +262,6 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "presign": None, "presign_ttl": "integer", "project": "integer", - "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, @@ -304,7 +296,6 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": True, "presign_ttl": 1, "project": 1, - "recursive_scan": True, "regex_filter": "regex_filter", "status": "initialized", "synchronizable": True, @@ -331,7 +322,6 @@ async def test_sync(client: LabelStudio, async_client: AsyncLabelStudio) -> None "presign": None, "presign_ttl": "integer", "project": "integer", - "recursive_scan": None, "regex_filter": None, "status": None, "synchronizable": None, diff --git a/tests/projects/test_members.py b/tests/projects/test_members.py index 330af2695..bc984ef0c 100644 --- a/tests/projects/test_members.py +++ b/tests/projects/test_members.py @@ -37,6 +37,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "trial_role": "annotator", }, "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "pause": "pause", "phone": "phone", "username": "username", @@ -74,6 +75,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "trial_role": None, }, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "pause": None, "phone": None, "username": None, diff --git a/tests/prompts/test_versions.py b/tests/prompts/test_versions.py index b240ce8da..06a4c79a1 100644 --- a/tests/prompts/test_versions.py +++ b/tests/prompts/test_versions.py @@ -61,10 +61,10 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non } }, ) - response = client.prompts.versions.list(prompt_id=1) + response = client.prompts.versions.list(prompt_id_=1, prompt_id=1) validate_response(response, expected_response, expected_types) - async_response = await async_client.prompts.versions.list(prompt_id=1) + async_response = await async_client.prompts.versions.list(prompt_id_=1, prompt_id=1) validate_response(async_response, expected_response, expected_types) diff --git a/tests/test_users.py b/tests/test_users.py index bcaef4118..6d3a0cbd0 100644 --- a/tests/test_users.py +++ b/tests/test_users.py @@ -21,6 +21,7 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStu "last_activity": "2024-01-15T09:30:00Z", "last_name": "last_name", "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "phone": "phone", "username": "username", } @@ -38,6 +39,7 @@ async def test_get_current_user(client: LabelStudio, async_client: AsyncLabelStu "last_activity": "datetime", "last_name": None, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "phone": None, "username": None, } @@ -63,6 +65,7 @@ async def test_update_current_user(client: LabelStudio, async_client: AsyncLabel "last_activity": "2024-01-15T09:30:00Z", "last_name": "last_name", "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "phone": "phone", "username": "username", } @@ -80,6 +83,7 @@ async def test_update_current_user(client: LabelStudio, async_client: AsyncLabel "last_activity": "datetime", "last_name": None, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "phone": None, "username": None, } @@ -161,6 +165,7 @@ async def test_whoami(client: LabelStudio, async_client: AsyncLabelStudio) -> No "trial_role": "annotator", }, "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "pause": "pause", "permissions": ["permissions"], "phone": "phone", @@ -196,6 +201,7 @@ async def test_whoami(client: LabelStudio, async_client: AsyncLabelStudio) -> No "trial_role": None, }, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "pause": None, "permissions": ("list", {0: None}), "phone": None, @@ -224,6 +230,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "last_activity": "2024-01-15T09:30:00Z", "last_name": "last_name", "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "phone": "phone", "username": "username", } @@ -245,6 +252,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "last_activity": "datetime", "last_name": None, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "phone": None, "username": None, } @@ -287,6 +295,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "trial_role": "annotator", }, "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "pause": "pause", "phone": "phone", "username": "username", @@ -320,6 +329,7 @@ async def test_create(client: LabelStudio, async_client: AsyncLabelStudio) -> No "trial_role": None, }, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "pause": None, "phone": None, "username": None, @@ -361,6 +371,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "trial_role": "annotator", }, "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "pause": "pause", "phone": "phone", "username": "username", @@ -394,6 +405,7 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None: "trial_role": None, }, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "pause": None, "phone": None, "username": None, @@ -448,6 +460,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "trial_role": "annotator", }, "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "pause": "pause", "phone": "phone", "username": "username", @@ -481,6 +494,7 @@ async def test_update(client: LabelStudio, async_client: AsyncLabelStudio) -> No "trial_role": None, }, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "pause": None, "phone": None, "username": None, diff --git a/tests/workspaces/test_members.py b/tests/workspaces/test_members.py index e20d22bfc..d4926043a 100644 --- a/tests/workspaces/test_members.py +++ b/tests/workspaces/test_members.py @@ -28,6 +28,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "invite_expired_at": "invite_expired_at", }, "org_membership": [{"active": "active", "organization_id": 1, "role": "role"}], + "organization_membership": {"active": "active", "organization_id": 1, "role": "role"}, "pause": "pause", "phone": "phone", "username": "username", @@ -58,6 +59,7 @@ async def test_list_(client: LabelStudio, async_client: AsyncLabelStudio) -> Non "invite_expired_at": None, }, "org_membership": ("list", {0: {"active": None, "organization_id": "integer", "role": None}}), + "organization_membership": {"active": None, "organization_id": "integer", "role": None}, "pause": None, "phone": None, "username": None,