Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 25, 2024
1 parent aa8e0d8 commit 33fc2f9
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ types:
type: optional<boolean>
docs: Show annotation history to annotator
organization: optional<integer>
prompt: optional<Prompt>
prompts: optional<list<Prompt>>
color:
type: optional<string>
validation:
Expand Down
40 changes: 20 additions & 20 deletions .mock/definition/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ service:
enable_empty_annotation: true
show_annotation_history: true
organization: 1
prompt:
title: title
input_fields:
- input_fields
output_classes:
- output_classes
prompts:
- title: title
input_fields:
- input_fields
output_classes:
- output_classes
color: color
maximum_annotations: 1
is_published: true
Expand Down Expand Up @@ -439,20 +439,20 @@ service:
enable_empty_annotation: true
show_annotation_history: true
organization: 1
prompt:
title: title
description: description
created_by: 1
created_at: '2024-01-15T09:30:00Z'
updated_at: '2024-01-15T09:30:00Z'
organization: 1
input_fields:
- input_fields
output_classes:
- output_classes
associated_projects:
- 1
skill_name: skill_name
prompts:
- title: title
description: description
created_by: 1
created_at: '2024-01-15T09:30:00Z'
updated_at: '2024-01-15T09:30:00Z'
organization: 1
input_fields:
- input_fields
output_classes:
- output_classes
associated_projects:
- 1
skill_name: skill_name
color: '#FF0000'
maximum_annotations: 1
is_published: true
Expand Down
6 changes: 4 additions & 2 deletions .mock/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8982,8 +8982,10 @@ components:
title: Organization
type: integer
nullable: true
prompt:
$ref: "#/components/schemas/Prompt"
prompts:
type: array
items:
$ref: "#/components/schemas/Prompt"
nullable: true
color:
title: Color
Expand Down
2 changes: 1 addition & 1 deletion src/label_studio_sdk/types/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Project(UniversalBaseModel):
"""

organization: typing.Optional[int] = None
prompt: typing.Optional[Prompt] = None
prompts: typing.Optional[typing.List[Prompt]] = None
color: typing.Optional[str] = None
maximum_annotations: typing.Optional[int] = pydantic.Field(default=None)
"""
Expand Down
55 changes: 31 additions & 24 deletions tests/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,20 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
"enable_empty_annotation": True,
"show_annotation_history": True,
"organization": 1,
"prompt": {
"title": "title",
"description": "description",
"created_by": 1,
"created_at": "2024-01-15T09:30:00Z",
"updated_at": "2024-01-15T09:30:00Z",
"organization": 1,
"input_fields": ["input_fields"],
"output_classes": ["output_classes"],
"associated_projects": [1],
"skill_name": "skill_name",
},
"prompts": [
{
"title": "title",
"description": "description",
"created_by": 1,
"created_at": "2024-01-15T09:30:00Z",
"updated_at": "2024-01-15T09:30:00Z",
"organization": 1,
"input_fields": ["input_fields"],
"output_classes": ["output_classes"],
"associated_projects": [1],
"skill_name": "skill_name",
}
],
"color": "#FF0000",
"maximum_annotations": 1,
"is_published": True,
Expand Down Expand Up @@ -121,18 +123,23 @@ async def test_get(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
"enable_empty_annotation": None,
"show_annotation_history": None,
"organization": "integer",
"prompt": {
"title": None,
"description": None,
"created_by": "integer",
"created_at": "datetime",
"updated_at": "datetime",
"organization": "integer",
"input_fields": ("list", {0: None}),
"output_classes": ("list", {0: None}),
"associated_projects": ("list", {0: "integer"}),
"skill_name": None,
},
"prompts": (
"list",
{
0: {
"title": None,
"description": None,
"created_by": "integer",
"created_at": "datetime",
"updated_at": "datetime",
"organization": "integer",
"input_fields": ("list", {0: None}),
"output_classes": ("list", {0: None}),
"associated_projects": ("list", {0: "integer"}),
"skill_name": None,
}
},
),
"color": None,
"maximum_annotations": "integer",
"is_published": None,
Expand Down

0 comments on commit 33fc2f9

Please sign in to comment.