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 20, 2024
1 parent f6d330b commit 4ddf262
Show file tree
Hide file tree
Showing 9 changed files with 329 additions and 326 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ dist/
.mypy_cache/
__pycache__/
poetry.toml
.idea/
1 change: 1 addition & 0 deletions .mock/definition/__package__.yml
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ types:
type: optional<boolean>
docs: Show annotation history to annotator
organization: optional<integer>
prompt: optional<Prompt>
color:
type: optional<string>
validation:
Expand Down
20 changes: 20 additions & 0 deletions .mock/definition/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ service:
enable_empty_annotation: true
show_annotation_history: true
organization: 1
prompt:
title: title
input_fields:
- input_fields
output_classes:
- output_classes
color: color
maximum_annotations: 1
is_published: true
Expand Down Expand Up @@ -423,6 +429,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
color: '#FF0000'
maximum_annotations: 1
is_published: true
Expand Down
16 changes: 16 additions & 0 deletions .mock/definition/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,22 @@ service:
date_joined: '2024-01-15T09:30:00Z'
audiences:
- public
get_product_tour:
path: /api/current-user/product-tour
method: GET
auth: true
examples:
- {}
audiences:
- internal
update_product_tour:
path: /api/current-user/product-tour
method: PATCH
auth: true
examples:
- {}
audiences:
- internal
source:
openapi: openapi/openapi.yaml
imports:
Expand Down
3 changes: 3 additions & 0 deletions .mock/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8982,6 +8982,9 @@ components:
title: Organization
type: integer
nullable: true
prompt:
$ref: "#/components/schemas/Prompt"
nullable: true
color:
title: Color
type: string
Expand Down
581 changes: 260 additions & 321 deletions poetry.lock

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "label-studio-sdk"
version = "1.0.9.dev"
version = "1.0.9"
description = ""
readme = "README.md"
authors = []
Expand Down Expand Up @@ -31,7 +31,7 @@ packages = [
Repository = 'https://github.com/HumanSignal/label-studio-sdk'

[tool.poetry.dependencies]
python = ">=3.9,<4"
python = "^3.8"
Pillow = ">=10.0.1"
appdirs = ">=1.4.3"
datamodel-code-generator = "0.26.1"
Expand All @@ -40,7 +40,7 @@ ijson = ">=3.2.3"
jsonschema = ">=4.23.0"
lxml = ">=4.2.5"
nltk = "^3.9.1"
numpy = ">=1.26.4,<2.0.0"
numpy = "<2.0.0"
pandas = ">=0.24.0"
pydantic = ">= 1.9.2"
requests = ">=2.22.0"
Expand All @@ -49,7 +49,6 @@ typing_extensions = ">= 4.0.0"
ujson = ">=5.8.0"
xmljson = "0.2.1"

jsf = "^0.11.2"
[tool.poetry.dev-dependencies]
mypy = "1.0.1"
pytest = "^7.4.0"
Expand Down
2 changes: 2 additions & 0 deletions src/label_studio_sdk/types/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
from .project_sampling import ProjectSampling
from .project_skip_queue import ProjectSkipQueue
from .prompt import Prompt
from .user_simple import UserSimple


Expand Down Expand Up @@ -53,6 +54,7 @@ class Project(pydantic_v1.BaseModel):
"""

organization: typing.Optional[int] = None
prompt: typing.Optional[Prompt] = None
color: typing.Optional[str] = None
maximum_annotations: typing.Optional[int] = pydantic_v1.Field(default=None)
"""
Expand Down
24 changes: 24 additions & 0 deletions tests/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ 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",
},
"color": "#FF0000",
"maximum_annotations": 1,
"is_published": True,
Expand Down Expand Up @@ -110,6 +122,18 @@ 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,
},
"color": None,
"maximum_annotations": "integer",
"is_published": None,
Expand Down

0 comments on commit 4ddf262

Please sign in to comment.