vellum-ai 0.3.12__py3-none-any.whl → 0.3.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. vellum/__init__.py +86 -0
  2. vellum/client.py +3 -0
  3. vellum/core/client_wrapper.py +1 -1
  4. vellum/resources/__init__.py +2 -0
  5. vellum/resources/test_suite_runs/__init__.py +2 -0
  6. vellum/resources/test_suite_runs/client.py +223 -0
  7. vellum/types/__init__.py +98 -0
  8. vellum/types/paginated_test_suite_run_execution_list.py +32 -0
  9. vellum/types/test_suite_run_deployment_release_tag_exec_config.py +36 -0
  10. vellum/types/test_suite_run_deployment_release_tag_exec_config_data.py +31 -0
  11. vellum/types/test_suite_run_deployment_release_tag_exec_config_data_request.py +31 -0
  12. vellum/types/test_suite_run_deployment_release_tag_exec_config_request.py +38 -0
  13. vellum/types/test_suite_run_deployment_release_tag_exec_config_type_enum.py +5 -0
  14. vellum/types/test_suite_run_exec_config.py +33 -0
  15. vellum/types/test_suite_run_exec_config_request.py +33 -0
  16. vellum/types/test_suite_run_execution.py +33 -0
  17. vellum/types/test_suite_run_execution_chat_history_output.py +30 -0
  18. vellum/types/test_suite_run_execution_error_output.py +30 -0
  19. vellum/types/test_suite_run_execution_json_output.py +29 -0
  20. vellum/types/test_suite_run_execution_metric_result.py +30 -0
  21. vellum/types/test_suite_run_execution_number_output.py +29 -0
  22. vellum/types/test_suite_run_execution_output.py +78 -0
  23. vellum/types/test_suite_run_execution_search_results_output.py +30 -0
  24. vellum/types/test_suite_run_execution_string_output.py +29 -0
  25. vellum/types/test_suite_run_metric_error_output.py +34 -0
  26. vellum/types/test_suite_run_metric_error_output_type_enum.py +5 -0
  27. vellum/types/test_suite_run_metric_number_output.py +33 -0
  28. vellum/types/test_suite_run_metric_number_output_type_enum.py +5 -0
  29. vellum/types/test_suite_run_metric_output.py +31 -0
  30. vellum/types/test_suite_run_read.py +47 -0
  31. vellum/types/test_suite_run_state.py +41 -0
  32. vellum/types/test_suite_run_test_suite.py +30 -0
  33. vellum/types/test_suite_run_workflow_release_tag_exec_config.py +36 -0
  34. vellum/types/test_suite_run_workflow_release_tag_exec_config_data.py +33 -0
  35. vellum/types/test_suite_run_workflow_release_tag_exec_config_data_request.py +33 -0
  36. vellum/types/test_suite_run_workflow_release_tag_exec_config_request.py +38 -0
  37. vellum/types/test_suite_run_workflow_release_tag_exec_config_type_enum.py +5 -0
  38. vellum/types/workflow_output_array.py +1 -1
  39. vellum/types/workflow_output_chat_history.py +1 -1
  40. vellum/types/workflow_output_error.py +1 -1
  41. vellum/types/workflow_output_function_call.py +1 -1
  42. vellum/types/workflow_output_image.py +1 -1
  43. vellum/types/workflow_output_json.py +1 -1
  44. vellum/types/workflow_output_number.py +1 -1
  45. vellum/types/workflow_output_search_results.py +1 -1
  46. vellum/types/workflow_output_string.py +1 -1
  47. {vellum_ai-0.3.12.dist-info → vellum_ai-0.3.14.dist-info}/METADATA +1 -1
  48. {vellum_ai-0.3.12.dist-info → vellum_ai-0.3.14.dist-info}/RECORD +50 -18
  49. {vellum_ai-0.3.12.dist-info → vellum_ai-0.3.14.dist-info}/LICENSE +0 -0
  50. {vellum_ai-0.3.12.dist-info → vellum_ai-0.3.14.dist-info}/WHEEL +0 -0
@@ -0,0 +1,38 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .test_suite_run_deployment_release_tag_exec_config_data_request import (
8
+ TestSuiteRunDeploymentReleaseTagExecConfigDataRequest,
9
+ )
10
+
11
+ try:
12
+ import pydantic.v1 as pydantic # type: ignore
13
+ except ImportError:
14
+ import pydantic # type: ignore
15
+
16
+
17
+ class TestSuiteRunDeploymentReleaseTagExecConfigRequest(pydantic.BaseModel):
18
+ """
19
+ Execution configuration for running a Test Suite against a Prompt Deployment
20
+ """
21
+
22
+ data: TestSuiteRunDeploymentReleaseTagExecConfigDataRequest
23
+ test_case_ids: typing.Optional[typing.List[str]] = pydantic.Field(
24
+ description="Optionally specify a subset of test case ids to run. If not provided, all test cases within the test suite will be run by default."
25
+ )
26
+
27
+ def json(self, **kwargs: typing.Any) -> str:
28
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
+ return super().json(**kwargs_with_defaults)
30
+
31
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
33
+ return super().dict(**kwargs_with_defaults)
34
+
35
+ class Config:
36
+ frozen = True
37
+ smart_union = True
38
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+
5
+ TestSuiteRunDeploymentReleaseTagExecConfigTypeEnum = typing_extensions.Literal["DEPLOYMENT_RELEASE_TAG"]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import typing_extensions
8
+
9
+ from .test_suite_run_deployment_release_tag_exec_config import TestSuiteRunDeploymentReleaseTagExecConfig
10
+ from .test_suite_run_workflow_release_tag_exec_config import TestSuiteRunWorkflowReleaseTagExecConfig
11
+
12
+
13
+ class TestSuiteRunExecConfig_DeploymentReleaseTag(TestSuiteRunDeploymentReleaseTagExecConfig):
14
+ type: typing_extensions.Literal["DEPLOYMENT_RELEASE_TAG"]
15
+
16
+ class Config:
17
+ frozen = True
18
+ smart_union = True
19
+ allow_population_by_field_name = True
20
+
21
+
22
+ class TestSuiteRunExecConfig_WorkflowReleaseTag(TestSuiteRunWorkflowReleaseTagExecConfig):
23
+ type: typing_extensions.Literal["WORKFLOW_RELEASE_TAG"]
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ allow_population_by_field_name = True
29
+
30
+
31
+ TestSuiteRunExecConfig = typing.Union[
32
+ TestSuiteRunExecConfig_DeploymentReleaseTag, TestSuiteRunExecConfig_WorkflowReleaseTag
33
+ ]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import typing_extensions
8
+
9
+ from .test_suite_run_deployment_release_tag_exec_config_request import TestSuiteRunDeploymentReleaseTagExecConfigRequest
10
+ from .test_suite_run_workflow_release_tag_exec_config_request import TestSuiteRunWorkflowReleaseTagExecConfigRequest
11
+
12
+
13
+ class TestSuiteRunExecConfigRequest_DeploymentReleaseTag(TestSuiteRunDeploymentReleaseTagExecConfigRequest):
14
+ type: typing_extensions.Literal["DEPLOYMENT_RELEASE_TAG"]
15
+
16
+ class Config:
17
+ frozen = True
18
+ smart_union = True
19
+ allow_population_by_field_name = True
20
+
21
+
22
+ class TestSuiteRunExecConfigRequest_WorkflowReleaseTag(TestSuiteRunWorkflowReleaseTagExecConfigRequest):
23
+ type: typing_extensions.Literal["WORKFLOW_RELEASE_TAG"]
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ allow_population_by_field_name = True
29
+
30
+
31
+ TestSuiteRunExecConfigRequest = typing.Union[
32
+ TestSuiteRunExecConfigRequest_DeploymentReleaseTag, TestSuiteRunExecConfigRequest_WorkflowReleaseTag
33
+ ]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .test_suite_run_execution_metric_result import TestSuiteRunExecutionMetricResult
8
+ from .test_suite_run_execution_output import TestSuiteRunExecutionOutput
9
+
10
+ try:
11
+ import pydantic.v1 as pydantic # type: ignore
12
+ except ImportError:
13
+ import pydantic # type: ignore
14
+
15
+
16
+ class TestSuiteRunExecution(pydantic.BaseModel):
17
+ id: str
18
+ test_case_id: str
19
+ outputs: typing.List[TestSuiteRunExecutionOutput]
20
+ metric_results: typing.List[TestSuiteRunExecutionMetricResult]
21
+
22
+ def json(self, **kwargs: typing.Any) -> str:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().json(**kwargs_with_defaults)
25
+
26
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28
+ return super().dict(**kwargs_with_defaults)
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .chat_message import ChatMessage
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class TestSuiteRunExecutionChatHistoryOutput(pydantic.BaseModel):
16
+ output_variable_id: str
17
+ value: typing.Optional[typing.List[ChatMessage]]
18
+
19
+ def json(self, **kwargs: typing.Any) -> str:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().json(**kwargs_with_defaults)
22
+
23
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().dict(**kwargs_with_defaults)
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .vellum_error import VellumError
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class TestSuiteRunExecutionErrorOutput(pydantic.BaseModel):
16
+ output_variable_id: str
17
+ value: typing.Optional[VellumError]
18
+
19
+ def json(self, **kwargs: typing.Any) -> str:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().json(**kwargs_with_defaults)
22
+
23
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().dict(**kwargs_with_defaults)
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic.v1 as pydantic # type: ignore
10
+ except ImportError:
11
+ import pydantic # type: ignore
12
+
13
+
14
+ class TestSuiteRunExecutionJsonOutput(pydantic.BaseModel):
15
+ output_variable_id: str
16
+ value: typing.Optional[typing.Dict[str, typing.Any]]
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .test_suite_run_metric_output import TestSuiteRunMetricOutput
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class TestSuiteRunExecutionMetricResult(pydantic.BaseModel):
16
+ metric_id: str
17
+ outputs: typing.List[TestSuiteRunMetricOutput]
18
+
19
+ def json(self, **kwargs: typing.Any) -> str:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().json(**kwargs_with_defaults)
22
+
23
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().dict(**kwargs_with_defaults)
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic.v1 as pydantic # type: ignore
10
+ except ImportError:
11
+ import pydantic # type: ignore
12
+
13
+
14
+ class TestSuiteRunExecutionNumberOutput(pydantic.BaseModel):
15
+ output_variable_id: str
16
+ value: typing.Optional[float]
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,78 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import typing_extensions
8
+
9
+ from .test_suite_run_execution_chat_history_output import TestSuiteRunExecutionChatHistoryOutput
10
+ from .test_suite_run_execution_error_output import TestSuiteRunExecutionErrorOutput
11
+ from .test_suite_run_execution_json_output import TestSuiteRunExecutionJsonOutput
12
+ from .test_suite_run_execution_number_output import TestSuiteRunExecutionNumberOutput
13
+ from .test_suite_run_execution_search_results_output import TestSuiteRunExecutionSearchResultsOutput
14
+ from .test_suite_run_execution_string_output import TestSuiteRunExecutionStringOutput
15
+
16
+
17
+ class TestSuiteRunExecutionOutput_String(TestSuiteRunExecutionStringOutput):
18
+ type: typing_extensions.Literal["STRING"]
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ allow_population_by_field_name = True
24
+
25
+
26
+ class TestSuiteRunExecutionOutput_Number(TestSuiteRunExecutionNumberOutput):
27
+ type: typing_extensions.Literal["NUMBER"]
28
+
29
+ class Config:
30
+ frozen = True
31
+ smart_union = True
32
+ allow_population_by_field_name = True
33
+
34
+
35
+ class TestSuiteRunExecutionOutput_Json(TestSuiteRunExecutionJsonOutput):
36
+ type: typing_extensions.Literal["JSON"]
37
+
38
+ class Config:
39
+ frozen = True
40
+ smart_union = True
41
+ allow_population_by_field_name = True
42
+
43
+
44
+ class TestSuiteRunExecutionOutput_ChatHistory(TestSuiteRunExecutionChatHistoryOutput):
45
+ type: typing_extensions.Literal["CHAT_HISTORY"]
46
+
47
+ class Config:
48
+ frozen = True
49
+ smart_union = True
50
+ allow_population_by_field_name = True
51
+
52
+
53
+ class TestSuiteRunExecutionOutput_SearchResults(TestSuiteRunExecutionSearchResultsOutput):
54
+ type: typing_extensions.Literal["SEARCH_RESULTS"]
55
+
56
+ class Config:
57
+ frozen = True
58
+ smart_union = True
59
+ allow_population_by_field_name = True
60
+
61
+
62
+ class TestSuiteRunExecutionOutput_Error(TestSuiteRunExecutionErrorOutput):
63
+ type: typing_extensions.Literal["ERROR"]
64
+
65
+ class Config:
66
+ frozen = True
67
+ smart_union = True
68
+ allow_population_by_field_name = True
69
+
70
+
71
+ TestSuiteRunExecutionOutput = typing.Union[
72
+ TestSuiteRunExecutionOutput_String,
73
+ TestSuiteRunExecutionOutput_Number,
74
+ TestSuiteRunExecutionOutput_Json,
75
+ TestSuiteRunExecutionOutput_ChatHistory,
76
+ TestSuiteRunExecutionOutput_SearchResults,
77
+ TestSuiteRunExecutionOutput_Error,
78
+ ]
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .search_result import SearchResult
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class TestSuiteRunExecutionSearchResultsOutput(pydantic.BaseModel):
16
+ output_variable_id: str
17
+ value: typing.Optional[typing.List[SearchResult]]
18
+
19
+ def json(self, **kwargs: typing.Any) -> str:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().json(**kwargs_with_defaults)
22
+
23
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().dict(**kwargs_with_defaults)
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic.v1 as pydantic # type: ignore
10
+ except ImportError:
11
+ import pydantic # type: ignore
12
+
13
+
14
+ class TestSuiteRunExecutionStringOutput(pydantic.BaseModel):
15
+ output_variable_id: str
16
+ value: typing.Optional[str]
17
+
18
+ def json(self, **kwargs: typing.Any) -> str:
19
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20
+ return super().json(**kwargs_with_defaults)
21
+
22
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().dict(**kwargs_with_defaults)
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,34 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .vellum_error import VellumError
8
+
9
+ try:
10
+ import pydantic.v1 as pydantic # type: ignore
11
+ except ImportError:
12
+ import pydantic # type: ignore
13
+
14
+
15
+ class TestSuiteRunMetricErrorOutput(pydantic.BaseModel):
16
+ """
17
+ Output for a test suite run metric that is of type ERROR
18
+ """
19
+
20
+ value: VellumError
21
+ name: str
22
+
23
+ def json(self, **kwargs: typing.Any) -> str:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().json(**kwargs_with_defaults)
26
+
27
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
28
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
+ return super().dict(**kwargs_with_defaults)
30
+
31
+ class Config:
32
+ frozen = True
33
+ smart_union = True
34
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+
5
+ TestSuiteRunMetricErrorOutputTypeEnum = typing_extensions.Literal["ERROR"]
@@ -0,0 +1,33 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic.v1 as pydantic # type: ignore
10
+ except ImportError:
11
+ import pydantic # type: ignore
12
+
13
+
14
+ class TestSuiteRunMetricNumberOutput(pydantic.BaseModel):
15
+ """
16
+ Output for a test suite run metric that is of type NUMBER
17
+ """
18
+
19
+ value: float
20
+ name: str
21
+
22
+ def json(self, **kwargs: typing.Any) -> str:
23
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24
+ return super().json(**kwargs_with_defaults)
25
+
26
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
27
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28
+ return super().dict(**kwargs_with_defaults)
29
+
30
+ class Config:
31
+ frozen = True
32
+ smart_union = True
33
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing_extensions
4
+
5
+ TestSuiteRunMetricNumberOutputTypeEnum = typing_extensions.Literal["NUMBER"]
@@ -0,0 +1,31 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from __future__ import annotations
4
+
5
+ import typing
6
+
7
+ import typing_extensions
8
+
9
+ from .test_suite_run_metric_error_output import TestSuiteRunMetricErrorOutput
10
+ from .test_suite_run_metric_number_output import TestSuiteRunMetricNumberOutput
11
+
12
+
13
+ class TestSuiteRunMetricOutput_Number(TestSuiteRunMetricNumberOutput):
14
+ type: typing_extensions.Literal["NUMBER"]
15
+
16
+ class Config:
17
+ frozen = True
18
+ smart_union = True
19
+ allow_population_by_field_name = True
20
+
21
+
22
+ class TestSuiteRunMetricOutput_Error(TestSuiteRunMetricErrorOutput):
23
+ type: typing_extensions.Literal["ERROR"]
24
+
25
+ class Config:
26
+ frozen = True
27
+ smart_union = True
28
+ allow_population_by_field_name = True
29
+
30
+
31
+ TestSuiteRunMetricOutput = typing.Union[TestSuiteRunMetricOutput_Number, TestSuiteRunMetricOutput_Error]
@@ -0,0 +1,47 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from .test_suite_run_exec_config import TestSuiteRunExecConfig
8
+ from .test_suite_run_state import TestSuiteRunState
9
+ from .test_suite_run_test_suite import TestSuiteRunTestSuite
10
+
11
+ try:
12
+ import pydantic.v1 as pydantic # type: ignore
13
+ except ImportError:
14
+ import pydantic # type: ignore
15
+
16
+
17
+ class TestSuiteRunRead(pydantic.BaseModel):
18
+ id: str
19
+ created: dt.datetime
20
+ test_suite: TestSuiteRunTestSuite
21
+ state: typing.Optional[TestSuiteRunState] = pydantic.Field(
22
+ description=(
23
+ "The current state of this run\n"
24
+ "\n"
25
+ "- `QUEUED` - Queued\n"
26
+ "- `RUNNING` - Running\n"
27
+ "- `COMPLETE` - Complete\n"
28
+ "- `FAILED` - Failed\n"
29
+ "- `CANCELLED` - Cancelled\n"
30
+ )
31
+ )
32
+ exec_config: typing.Optional[TestSuiteRunExecConfig] = pydantic.Field(
33
+ description="Configuration that defines how the Test Suite should be run"
34
+ )
35
+
36
+ def json(self, **kwargs: typing.Any) -> str:
37
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
38
+ return super().json(**kwargs_with_defaults)
39
+
40
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
41
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
42
+ return super().dict(**kwargs_with_defaults)
43
+
44
+ class Config:
45
+ frozen = True
46
+ smart_union = True
47
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,41 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import enum
4
+ import typing
5
+
6
+ T_Result = typing.TypeVar("T_Result")
7
+
8
+
9
+ class TestSuiteRunState(str, enum.Enum):
10
+ """
11
+ - `QUEUED` - Queued
12
+ - `RUNNING` - Running
13
+ - `COMPLETE` - Complete
14
+ - `FAILED` - Failed
15
+ - `CANCELLED` - Cancelled
16
+ """
17
+
18
+ QUEUED = "QUEUED"
19
+ RUNNING = "RUNNING"
20
+ COMPLETE = "COMPLETE"
21
+ FAILED = "FAILED"
22
+ CANCELLED = "CANCELLED"
23
+
24
+ def visit(
25
+ self,
26
+ queued: typing.Callable[[], T_Result],
27
+ running: typing.Callable[[], T_Result],
28
+ complete: typing.Callable[[], T_Result],
29
+ failed: typing.Callable[[], T_Result],
30
+ cancelled: typing.Callable[[], T_Result],
31
+ ) -> T_Result:
32
+ if self is TestSuiteRunState.QUEUED:
33
+ return queued()
34
+ if self is TestSuiteRunState.RUNNING:
35
+ return running()
36
+ if self is TestSuiteRunState.COMPLETE:
37
+ return complete()
38
+ if self is TestSuiteRunState.FAILED:
39
+ return failed()
40
+ if self is TestSuiteRunState.CANCELLED:
41
+ return cancelled()
@@ -0,0 +1,30 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+
8
+ try:
9
+ import pydantic.v1 as pydantic # type: ignore
10
+ except ImportError:
11
+ import pydantic # type: ignore
12
+
13
+
14
+ class TestSuiteRunTestSuite(pydantic.BaseModel):
15
+ id: str
16
+ history_item_id: str
17
+ label: str
18
+
19
+ def json(self, **kwargs: typing.Any) -> str:
20
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
21
+ return super().json(**kwargs_with_defaults)
22
+
23
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
24
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
25
+ return super().dict(**kwargs_with_defaults)
26
+
27
+ class Config:
28
+ frozen = True
29
+ smart_union = True
30
+ json_encoders = {dt.datetime: serialize_datetime}