Skip to content

Commit 204d5dc

Browse files
Merge pull request #288 from conductor-sdk/auto-serder-test
serialisation deserialisation tests + fixes in model files
2 parents 67aa4dc + 82d7c65 commit 204d5dc

84 files changed

Lines changed: 5139 additions & 71 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/conductor/client/configuration/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(
2929
self.temp_folder_path = None
3030
self.__ui_host = os.getenv('CONDUCTOR_UI_SERVER_URL')
3131
if self.__ui_host is None:
32-
self.__ui_host = self.host.replace('8080/api', '5000')
32+
self.__ui_host = self.host.replace('8080/api', '5001')
3333

3434
if authentication_settings is not None:
3535
self.authentication_settings = authentication_settings

src/conductor/client/http/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from conductor.client.http.models.task_details import TaskDetails
3838
from conductor.client.http.models.task_exec_log import TaskExecLog
3939
from conductor.client.http.models.task_result import TaskResult
40+
from conductor.client.http.models.task_result_status import TaskResultStatus
4041
from conductor.client.http.models.task_summary import TaskSummary
4142
from conductor.client.http.models.token import Token
4243
from conductor.client.http.models.upsert_group_request import UpsertGroupRequest
@@ -47,6 +48,7 @@
4748
from conductor.client.http.models.workflow_schedule import WorkflowSchedule
4849
from conductor.client.http.models.workflow_schedule_execution_model import WorkflowScheduleExecutionModel
4950
from conductor.client.http.models.workflow_status import WorkflowStatus
51+
from conductor.client.http.models.workflow_state_update import WorkflowStateUpdate
5052
from conductor.client.http.models.workflow_summary import WorkflowSummary
5153
from conductor.client.http.models.workflow_tag import WorkflowTag
5254
from conductor.client.http.models.integration import Integration

src/conductor/client/http/models/create_or_update_application_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ class CreateOrUpdateApplicationRequest:
1919
attribute_map (dict): The key is attribute name
2020
and the value is json key in definition.
2121
"""
22-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
22+
swagger_types = {
2323
'name': 'str'
24-
})
24+
}
2525

26-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
26+
attribute_map = {
2727
'name': 'name'
28-
})
28+
}
2929

3030
name: InitVar[Optional[str]] = None
3131
_name: Optional[str] = field(default=None, init=False)

src/conductor/client/http/models/generate_token_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class GenerateTokenRequest:
2222
key_secret: Optional[str] = field(default=None)
2323

2424
# Class variables
25-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
25+
swagger_types = {
2626
'key_id': 'str',
2727
'key_secret': 'str'
28-
})
28+
}
2929

30-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
30+
attribute_map = {
3131
'key_id': 'keyId',
3232
'key_secret': 'keySecret'
33-
})
33+
}
3434

3535
def __init__(self, key_id=None, key_secret=None): # noqa: E501
3636
"""GenerateTokenRequest - a model defined in Swagger""" # noqa: E501

src/conductor/client/http/models/integration.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class Integration:
3333
_updated_on: Optional[int] = field(default=None, init=False)
3434
_apis: Optional[List['IntegrationApi']] = field(default=None, init=False)
3535

36-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
36+
swagger_types = {
3737
'category': 'str',
3838
'configuration': 'dict(str, object)',
3939
'created_by': 'str',
@@ -47,9 +47,9 @@ class Integration:
4747
'updated_by': 'str',
4848
'updated_on': 'int',
4949
'apis': 'list[IntegrationApi]'
50-
}, init=False)
50+
}
5151

52-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
52+
attribute_map = {
5353
'category': 'category',
5454
'configuration': 'configuration',
5555
'created_by': 'createdBy',
@@ -63,7 +63,7 @@ class Integration:
6363
'updated_by': 'updatedBy',
6464
'updated_on': 'updatedOn',
6565
'apis': 'apis'
66-
}, init=False)
66+
}
6767

6868
def __init__(self, category=None, configuration=None, created_by=None, created_on=None, description=None,
6969
enabled=None, models_count=None, name=None, tags=None, type=None, updated_by=None,

src/conductor/client/http/models/integration_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class IntegrationApi:
2626
_updated_by: Optional[str] = field(default=None, repr=False)
2727
_updated_on: Optional[int] = field(default=None, repr=False)
2828

29-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
29+
swagger_types = {
3030
'api': 'str',
3131
'configuration': 'dict(str, object)',
3232
'created_by': 'str',
@@ -37,9 +37,9 @@ class IntegrationApi:
3737
'tags': 'list[TagObject]',
3838
'updated_by': 'str',
3939
'updated_on': 'int'
40-
}, repr=False)
40+
}
4141

42-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
42+
attribute_map = {
4343
'api': 'api',
4444
'configuration': 'configuration',
4545
'created_by': 'createdBy',
@@ -50,7 +50,7 @@ class IntegrationApi:
5050
'tags': 'tags',
5151
'updated_by': 'updatedBy',
5252
'updated_on': 'updatedOn'
53-
}, repr=False)
53+
}
5454

5555
discriminator: Optional[str] = field(default=None, repr=False)
5656

src/conductor/client/http/models/permission.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ class Permission:
1717
attribute_map (dict): The key is attribute name
1818
and the value is json key in definition.
1919
"""
20-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
20+
swagger_types = {
2121
'name': 'str'
22-
})
22+
}
2323

24-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
24+
attribute_map = {
2525
'name': 'name'
26-
})
26+
}
2727

2828
_name: Optional[str] = field(default=None, init=False)
2929

src/conductor/client/http/models/poll_data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ class PollData:
1919
attribute_map (dict): The key is attribute name
2020
and the value is json key in definition.
2121
"""
22-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
22+
swagger_types = {
2323
'queue_name': 'str',
2424
'domain': 'str',
2525
'worker_id': 'str',
2626
'last_poll_time': 'int'
27-
})
27+
}
2828

29-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
29+
attribute_map = {
3030
'queue_name': 'queueName',
3131
'domain': 'domain',
3232
'worker_id': 'workerId',
3333
'last_poll_time': 'lastPollTime'
34-
})
34+
}
3535

3636
queue_name: Optional[str] = field(default=None)
3737
domain: Optional[str] = field(default=None)

src/conductor/client/http/models/prompt_test_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,25 @@ class PromptTemplateTestRequest:
3737
_top_p: Optional[float] = field(init=False, repr=False, default=None)
3838

3939
# Class variables
40-
swagger_types: Dict[str, str] = field(init=False, repr=False, default_factory=lambda: {
40+
swagger_types = {
4141
'llm_provider': 'str',
4242
'model': 'str',
4343
'prompt': 'str',
4444
'prompt_variables': 'dict(str, object)',
4545
'stop_words': 'list[str]',
4646
'temperature': 'float',
4747
'top_p': 'float'
48-
})
48+
}
4949

50-
attribute_map: Dict[str, str] = field(init=False, repr=False, default_factory=lambda: {
50+
attribute_map = {
5151
'llm_provider': 'llmProvider',
5252
'model': 'model',
5353
'prompt': 'prompt',
5454
'prompt_variables': 'promptVariables',
5555
'stop_words': 'stopWords',
5656
'temperature': 'temperature',
5757
'top_p': 'topP'
58-
})
58+
}
5959

6060
discriminator: None = field(init=False, repr=False, default=None)
6161

src/conductor/client/http/models/rerun_workflow_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ class RerunWorkflowRequest:
2626
correlation_id: InitVar[Optional[str]] = None
2727

2828
# Class properties for swagger documentation
29-
swagger_types: Dict[str, str] = field(default_factory=lambda: {
29+
swagger_types = {
3030
're_run_from_workflow_id': 'str',
3131
'workflow_input': 'dict(str, object)',
3232
're_run_from_task_id': 'str',
3333
'task_input': 'dict(str, object)',
3434
'correlation_id': 'str'
35-
}, init=False)
35+
}
3636

37-
attribute_map: Dict[str, str] = field(default_factory=lambda: {
37+
attribute_map = {
3838
're_run_from_workflow_id': 'reRunFromWorkflowId',
3939
'workflow_input': 'workflowInput',
4040
're_run_from_task_id': 'reRunFromTaskId',
4141
'task_input': 'taskInput',
4242
'correlation_id': 'correlationId'
43-
}, init=False)
43+
}
4444

4545
def __post_init__(self, re_run_from_workflow_id, workflow_input, re_run_from_task_id, task_input, correlation_id):
4646
"""Initialize attributes after @dataclass initialization"""

0 commit comments

Comments
 (0)