Skip to content

Commit

Permalink
feat: add path to run (#256)
Browse files Browse the repository at this point in the history
Co-authored-by: Work Trial 3 <worktrial3@gentrace.ai>
  • Loading branch information
rlargman and WorkTrial3Gentrace authored Dec 17, 2024
1 parent 0c2a8e4 commit 420a82f
Show file tree
Hide file tree
Showing 176 changed files with 1,724 additions and 930 deletions.
2 changes: 1 addition & 1 deletion examples/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ docs/models/MetadataValueObject.md
docs/models/Pipeline.md
docs/models/PipelineV2.md
docs/models/ResolvedStepRun.md
docs/models/RunPathSection.md
docs/models/RunRequest.md
docs/models/RunResponse.md
docs/models/RunV2.md
Expand Down Expand Up @@ -104,6 +105,8 @@ gentrace/model/pipeline_v2.py
gentrace/model/pipeline_v2.pyi
gentrace/model/resolved_step_run.py
gentrace/model/resolved_step_run.pyi
gentrace/model/run_path_section.py
gentrace/model/run_path_section.pyi
gentrace/model/run_request.py
gentrace/model/run_request.pyi
gentrace/model/run_response.py
Expand Down
88 changes: 88 additions & 0 deletions package/docs/apis/tags/V1Api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,7 @@ Add more test runs to a result
import gentrace
from gentrace.apis.tags import v1_api
from gentrace.model.metadata_value_object import MetadataValueObject
from gentrace.model.run_path_section import RunPathSection
from gentrace.model.step_run import StepRun
from pprint import pprint
# Defining the host is optional and defaults to https://gentrace.ai/api
Expand Down Expand Up @@ -1621,6 +1622,12 @@ with gentrace.ApiClient(configuration) as api_client:
error="error_example",
)
],
path=[
RunPathSection(
type="suite",
name="name_example",
)
],
error="error_example",
)
],
Expand Down Expand Up @@ -1690,6 +1697,7 @@ Key | Input Type | Accessed Type | Description | Notes
**name** | str, | str, | The name of the test run. Used with &#x27;inputs&#x27; and mutually exclusive with &#x27;caseId&#x27;. | [optional]
**[inputs](#inputs)** | dict, frozendict.frozendict, | frozendict.frozendict, | The input data for the test run. Used with &#x27;name&#x27; and mutually exclusive with &#x27;caseId&#x27;. | [optional]
**[metadata](#metadata)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | [optional]
**[path](#path)** | list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. | [optional]
**error** | None, str, | NoneClass, str, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

Expand Down Expand Up @@ -1731,6 +1739,20 @@ Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**StepRun**]({{complexTypePrefix}}StepRun.md) | [**StepRun**]({{complexTypePrefix}}StepRun.md) | [**StepRun**]({{complexTypePrefix}}StepRun.md) | |

# path

Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests.

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. |

### Tuple Items
Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | |

### path_params
#### RequestPathParams

Expand Down Expand Up @@ -1828,6 +1850,7 @@ Create a new test result from runs
import gentrace
from gentrace.apis.tags import v1_api
from gentrace.model.metadata_value_object import MetadataValueObject
from gentrace.model.run_path_section import RunPathSection
from gentrace.model.local_evaluation import LocalEvaluation
from gentrace.model.step_run import StepRun
from pprint import pprint
Expand Down Expand Up @@ -1914,6 +1937,12 @@ with gentrace.ApiClient(configuration) as api_client:
),
)
],
path=[
RunPathSection(
type="suite",
name="name_example",
)
],
error="error_example",
)
],
Expand Down Expand Up @@ -2003,6 +2032,7 @@ Key | Input Type | Accessed Type | Description | Notes
**[expectedOutputs](#expectedOutputs)** | dict, frozendict.frozendict, | frozendict.frozendict, | Used for supplying local data. The expected outputs for the test run. Used with &#x27;name&#x27; and mutually exclusive with &#x27;caseId&#x27;. Optional, since not all evaluators require expected outputs. | [optional]
**[metadata](#metadata)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | [optional]
**[evaluations](#evaluations)** | list, tuple, | tuple, | Optional array of local evaluations | [optional]
**[path](#path)** | list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. | [optional]
**error** | None, str, | NoneClass, str, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

Expand Down Expand Up @@ -2074,6 +2104,20 @@ Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**LocalEvaluation**]({{complexTypePrefix}}LocalEvaluation.md) | [**LocalEvaluation**]({{complexTypePrefix}}LocalEvaluation.md) | [**LocalEvaluation**]({{complexTypePrefix}}LocalEvaluation.md) | |

# path

Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests.

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. |

### Tuple Items
Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | |

### Return Types, Responses

Code | Class | Description
Expand Down Expand Up @@ -2132,6 +2176,7 @@ Add more test runs to a result (simple version)
```python
import gentrace
from gentrace.apis.tags import v1_api
from gentrace.model.run_path_section import RunPathSection
from pprint import pprint
# Defining the host is optional and defaults to https://gentrace.ai/api
# See configuration.py for a list of all supported configuration parameters.
Expand Down Expand Up @@ -2164,6 +2209,12 @@ with gentrace.ApiClient(configuration) as api_client:
case_id="case_id_example",
inputs=dict(),
outputs=dict(),
path=[
RunPathSection(
type="suite",
name="name_example",
)
],
error="error_example",
)
],
Expand Down Expand Up @@ -2231,6 +2282,7 @@ Key | Input Type | Accessed Type | Description | Notes
**caseId** | str, uuid.UUID, | str, | The ID of the test case | value must be a uuid
**id** | None, str, uuid.UUID, | NoneClass, str, | The ID of the test run | [optional] value must be a uuid
**[outputs](#outputs)** | dict, frozendict.frozendict, | frozendict.frozendict, | The returned outputs for the test case | [optional]
**[path](#path)** | list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. | [optional]
**error** | None, str, | NoneClass, str, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

Expand Down Expand Up @@ -2262,6 +2314,20 @@ Key | Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | ------------- | -------------
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

# path

Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests.

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. |

### Tuple Items
Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | |

### path_params
#### RequestPathParams

Expand Down Expand Up @@ -2359,6 +2425,7 @@ Create a new test result from test runs
import gentrace
from gentrace.apis.tags import v1_api
from gentrace.model.metadata_value_object import MetadataValueObject
from gentrace.model.run_path_section import RunPathSection
from gentrace.model.local_evaluation import LocalEvaluation
from pprint import pprint
# Defining the host is optional and defaults to https://gentrace.ai/api
Expand Down Expand Up @@ -2419,6 +2486,12 @@ with gentrace.ApiClient(configuration) as api_client:
),
)
],
path=[
RunPathSection(
type="suite",
name="name_example",
)
],
error="error_example",
)
],
Expand Down Expand Up @@ -2503,6 +2576,7 @@ Key | Input Type | Accessed Type | Description | Notes
**id** | None, str, uuid.UUID, | NoneClass, str, | The ID of the test run | [optional] value must be a uuid
**[outputs](#outputs)** | dict, frozendict.frozendict, | frozendict.frozendict, | The returned outputs for the test case | [optional]
**[evaluations](#evaluations)** | list, tuple, | tuple, | Optional array of local evaluations | [optional]
**[path](#path)** | list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. | [optional]
**error** | None, str, | NoneClass, str, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

Expand Down Expand Up @@ -2548,6 +2622,20 @@ Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**LocalEvaluation**]({{complexTypePrefix}}LocalEvaluation.md) | [**LocalEvaluation**]({{complexTypePrefix}}LocalEvaluation.md) | [**LocalEvaluation**]({{complexTypePrefix}}LocalEvaluation.md) | |

# path

Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests.

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
list, tuple, None, | tuple, NoneClass, | Optional path which describes the organizational hierarchy of this test run in relation to all the pipeline tests. |

### Tuple Items
Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | [**RunPathSection**]({{complexTypePrefix}}RunPathSection.md) | |

### Return Types, Responses

Code | Class | Description
Expand Down
13 changes: 13 additions & 0 deletions package/docs/models/FullRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Key | Input Type | Accessed Type | Description | Notes
**[outputs](#outputs)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | [optional]
**renderHTMLKey** | None, str, | NoneClass, str, | | [optional]
**[metadata](#metadata)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | [optional]
**[path](#path)** | list, tuple, None, | tuple, NoneClass, | | [optional]
**error** | None, str, | NoneClass, str, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

Expand Down Expand Up @@ -60,5 +61,17 @@ Key | Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | ------------- | -------------
**any_string_name** | [**MetadataValueObject**](MetadataValueObject.md) | [**MetadataValueObject**](MetadataValueObject.md) | any string name can be used but the value must be the correct type | [optional]

# path

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
list, tuple, None, | tuple, NoneClass, | |

### Tuple Items
Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**RunPathSection**](RunPathSection.md) | [**RunPathSection**](RunPathSection.md) | [**RunPathSection**](RunPathSection.md) | |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

2 changes: 1 addition & 1 deletion package/docs/models/ResolvedStepRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Key | Input Type | Accessed Type | Description | Notes
**startTime** | str, | str, | | [optional]
**endTime** | str, | str, | | [optional]
**pipelineRunId** | str, uuid.UUID, | str, | | [optional] value must be a uuid
**error** | None, str, | NoneClass, str, | Error message if the step run failed | [optional]
**error** | None, str, | NoneClass, str, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

# modelParams
Expand Down
16 changes: 16 additions & 0 deletions package/docs/models/RunPathSection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# gentrace.model.run_path_section.RunPathSection

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
dict, frozendict.frozendict, | frozendict.frozendict, | |

### Dictionary Keys
Key | Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | ------------- | -------------
**name** | str, | str, | |
**type** | str, | str, | | must be one of ["suite", ]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

13 changes: 13 additions & 0 deletions package/docs/models/TestRun.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ Key | Input Type | Accessed Type | Description | Notes
**caseId** | str, uuid.UUID, | str, | | value must be a uuid
**id** | str, uuid.UUID, | str, | | value must be a uuid
**updatedAt** | str, | str, | |
**[path](#path)** | list, tuple, None, | tuple, NoneClass, | | [optional]
**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional]

# path

## Model Type Info
Input Type | Accessed Type | Description | Notes
------------ | ------------- | ------------- | -------------
list, tuple, None, | tuple, NoneClass, | |

### Tuple Items
Class Name | Input Type | Accessed Type | Description | Notes
------------- | ------------- | ------------- | ------------- | -------------
[**RunPathSection**](RunPathSection.md) | [**RunPathSection**](RunPathSection.md) | [**RunPathSection**](RunPathSection.md) | |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

26 changes: 13 additions & 13 deletions package/gentrace/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,39 @@
Generated by: https://openapi-generator.tech
"""

import atexit
import email
from dataclasses import dataclass
from decimal import Decimal
import enum
import io
import email
import json
import os
import io
import atexit
from multiprocessing.pool import ThreadPool
import re
import tempfile
import typing
from dataclasses import dataclass
from decimal import Decimal
from multiprocessing.pool import ThreadPool
from urllib.parse import quote, urlparse

import frozendict
import typing_extensions
import urllib3
from urllib3._collections import HTTPHeaderDict
from urllib.parse import urlparse, quote
from urllib3.fields import RequestField as RequestFieldBase

import frozendict

from gentrace import rest
from gentrace.configuration import Configuration
from gentrace.exceptions import ApiTypeError, ApiValueError
from gentrace.schemas import (
BinarySchema,
BoolClass,
FileIO,
NoneClass,
BoolClass,
Schema,
Unset,
FileIO,
BinarySchema,
date,
datetime,
none_type,
Unset,
unset,
)

Expand Down
Loading

0 comments on commit 420a82f

Please sign in to comment.