Skip to content

Commit 9fa0fbf

Browse files
feat(api): expose test update endpoint
1 parent 1b4e05e commit 9fa0fbf

File tree

6 files changed

+29
-224
lines changed

6 files changed

+29
-224
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 17
2-
openapi_spec_hash: 4f09f95fd31c148d1be80b7e643346ce
3-
config_hash: 087e6b8013c398a6d24031d24594fdec
2+
openapi_spec_hash: 8827ead72aa0c635ccafac5e008fe247
3+
config_hash: 30422a4611d93ca69e4f1aff60b9ddb5

src/openlayer/types/commits/test_result_list_response.py

+2-44
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,13 @@ class ItemGoalThresholdInsightParameter(BaseModel):
1919

2020

2121
class ItemGoalThreshold(BaseModel):
22-
insight_name: Optional[
23-
Literal[
24-
"characterLength",
25-
"classImbalance",
26-
"expectColumnAToBeInColumnB",
27-
"columnAverage",
28-
"columnDrift",
29-
"columnValuesMatch",
30-
"confidenceDistribution",
31-
"conflictingLabelRowCount",
32-
"containsPii",
33-
"containsValidUrl",
34-
"correlatedFeatures",
35-
"customMetric",
36-
"duplicateRowCount",
37-
"emptyFeatures",
38-
"featureDrift",
39-
"featureProfile",
40-
"greatExpectations",
41-
"groupByColumnStatsCheck",
42-
"illFormedRowCount",
43-
"isCode",
44-
"isJson",
45-
"llmRubricV2",
46-
"labelDrift",
47-
"metrics",
48-
"newCategories",
49-
"newLabels",
50-
"nullRowCount",
51-
"ppScore",
52-
"quasiConstantFeatures",
53-
"sentenceLength",
54-
"sizeRatio",
55-
"specialCharacters",
56-
"stringValidation",
57-
"trainValLeakageRowCount",
58-
]
59-
] = FieldInfo(alias="insightName", default=None)
22+
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
6023
"""The insight name to be evaluated."""
6124

6225
insight_parameters: Optional[List[ItemGoalThresholdInsightParameter]] = FieldInfo(
6326
alias="insightParameters", default=None
6427
)
65-
"""The insight parameters.
66-
67-
Required only for some test subtypes. For example, for tests that require a
68-
column name, the insight parameters will be [{'name': 'column_name', 'value':
69-
'Age'}]
70-
"""
28+
"""The insight parameters. Required only for some test subtypes."""
7129

7230
measurement: Optional[str] = None
7331
"""The measurement to be evaluated."""

src/openlayer/types/inference_pipelines/test_result_list_response.py

+2-44
Original file line numberDiff line numberDiff line change
@@ -19,55 +19,13 @@ class ItemGoalThresholdInsightParameter(BaseModel):
1919

2020

2121
class ItemGoalThreshold(BaseModel):
22-
insight_name: Optional[
23-
Literal[
24-
"characterLength",
25-
"classImbalance",
26-
"expectColumnAToBeInColumnB",
27-
"columnAverage",
28-
"columnDrift",
29-
"columnValuesMatch",
30-
"confidenceDistribution",
31-
"conflictingLabelRowCount",
32-
"containsPii",
33-
"containsValidUrl",
34-
"correlatedFeatures",
35-
"customMetric",
36-
"duplicateRowCount",
37-
"emptyFeatures",
38-
"featureDrift",
39-
"featureProfile",
40-
"greatExpectations",
41-
"groupByColumnStatsCheck",
42-
"illFormedRowCount",
43-
"isCode",
44-
"isJson",
45-
"llmRubricV2",
46-
"labelDrift",
47-
"metrics",
48-
"newCategories",
49-
"newLabels",
50-
"nullRowCount",
51-
"ppScore",
52-
"quasiConstantFeatures",
53-
"sentenceLength",
54-
"sizeRatio",
55-
"specialCharacters",
56-
"stringValidation",
57-
"trainValLeakageRowCount",
58-
]
59-
] = FieldInfo(alias="insightName", default=None)
22+
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
6023
"""The insight name to be evaluated."""
6124

6225
insight_parameters: Optional[List[ItemGoalThresholdInsightParameter]] = FieldInfo(
6326
alias="insightParameters", default=None
6427
)
65-
"""The insight parameters.
66-
67-
Required only for some test subtypes. For example, for tests that require a
68-
column name, the insight parameters will be [{'name': 'column_name', 'value':
69-
'Age'}]
70-
"""
28+
"""The insight parameters. Required only for some test subtypes."""
7129

7230
measurement: Optional[str] = None
7331
"""The measurement to be evaluated."""

src/openlayer/types/projects/test_create_params.py

+2-45
Original file line numberDiff line numberDiff line change
@@ -105,56 +105,13 @@ class ThresholdInsightParameter(TypedDict, total=False):
105105

106106

107107
class Threshold(TypedDict, total=False):
108-
insight_name: Annotated[
109-
Literal[
110-
"characterLength",
111-
"classImbalance",
112-
"expectColumnAToBeInColumnB",
113-
"columnAverage",
114-
"columnDrift",
115-
"columnValuesMatch",
116-
"confidenceDistribution",
117-
"conflictingLabelRowCount",
118-
"containsPii",
119-
"containsValidUrl",
120-
"correlatedFeatures",
121-
"customMetric",
122-
"duplicateRowCount",
123-
"emptyFeatures",
124-
"featureDrift",
125-
"featureProfile",
126-
"greatExpectations",
127-
"groupByColumnStatsCheck",
128-
"illFormedRowCount",
129-
"isCode",
130-
"isJson",
131-
"llmRubricV2",
132-
"labelDrift",
133-
"metrics",
134-
"newCategories",
135-
"newLabels",
136-
"nullRowCount",
137-
"ppScore",
138-
"quasiConstantFeatures",
139-
"sentenceLength",
140-
"sizeRatio",
141-
"specialCharacters",
142-
"stringValidation",
143-
"trainValLeakageRowCount",
144-
],
145-
PropertyInfo(alias="insightName"),
146-
]
108+
insight_name: Annotated[str, PropertyInfo(alias="insightName")]
147109
"""The insight name to be evaluated."""
148110

149111
insight_parameters: Annotated[
150112
Optional[Iterable[ThresholdInsightParameter]], PropertyInfo(alias="insightParameters")
151113
]
152-
"""The insight parameters.
153-
154-
Required only for some test subtypes. For example, for tests that require a
155-
column name, the insight parameters will be [{'name': 'column_name', 'value':
156-
'Age'}]
157-
"""
114+
"""The insight parameters. Required only for some test subtypes."""
158115

159116
measurement: str
160117
"""The measurement to be evaluated."""

src/openlayer/types/projects/test_create_response.py

+2-44
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,11 @@ class ThresholdInsightParameter(BaseModel):
1919

2020

2121
class Threshold(BaseModel):
22-
insight_name: Optional[
23-
Literal[
24-
"characterLength",
25-
"classImbalance",
26-
"expectColumnAToBeInColumnB",
27-
"columnAverage",
28-
"columnDrift",
29-
"columnValuesMatch",
30-
"confidenceDistribution",
31-
"conflictingLabelRowCount",
32-
"containsPii",
33-
"containsValidUrl",
34-
"correlatedFeatures",
35-
"customMetric",
36-
"duplicateRowCount",
37-
"emptyFeatures",
38-
"featureDrift",
39-
"featureProfile",
40-
"greatExpectations",
41-
"groupByColumnStatsCheck",
42-
"illFormedRowCount",
43-
"isCode",
44-
"isJson",
45-
"llmRubricV2",
46-
"labelDrift",
47-
"metrics",
48-
"newCategories",
49-
"newLabels",
50-
"nullRowCount",
51-
"ppScore",
52-
"quasiConstantFeatures",
53-
"sentenceLength",
54-
"sizeRatio",
55-
"specialCharacters",
56-
"stringValidation",
57-
"trainValLeakageRowCount",
58-
]
59-
] = FieldInfo(alias="insightName", default=None)
22+
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
6023
"""The insight name to be evaluated."""
6124

6225
insight_parameters: Optional[List[ThresholdInsightParameter]] = FieldInfo(alias="insightParameters", default=None)
63-
"""The insight parameters.
64-
65-
Required only for some test subtypes. For example, for tests that require a
66-
column name, the insight parameters will be [{'name': 'column_name', 'value':
67-
'Age'}]
68-
"""
26+
"""The insight parameters. Required only for some test subtypes."""
6927

7028
measurement: Optional[str] = None
7129
"""The measurement to be evaluated."""

src/openlayer/types/projects/test_list_response.py

+19-45
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,21 @@
88

99
from ..._models import BaseModel
1010

11-
__all__ = ["TestListResponse", "Item", "ItemThreshold", "ItemThresholdInsightParameter"]
11+
__all__ = ["TestListResponse", "_Meta", "Item", "ItemThreshold", "ItemThresholdInsightParameter"]
12+
13+
14+
class _Meta(BaseModel):
15+
page: int
16+
"""The current page."""
17+
18+
per_page: int = FieldInfo(alias="perPage")
19+
"""The number of items per page."""
20+
21+
total_items: int = FieldInfo(alias="totalItems")
22+
"""The total number of items."""
23+
24+
total_pages: int = FieldInfo(alias="totalPages")
25+
"""The total number of pages."""
1226

1327

1428
class ItemThresholdInsightParameter(BaseModel):
@@ -19,55 +33,13 @@ class ItemThresholdInsightParameter(BaseModel):
1933

2034

2135
class ItemThreshold(BaseModel):
22-
insight_name: Optional[
23-
Literal[
24-
"characterLength",
25-
"classImbalance",
26-
"expectColumnAToBeInColumnB",
27-
"columnAverage",
28-
"columnDrift",
29-
"columnValuesMatch",
30-
"confidenceDistribution",
31-
"conflictingLabelRowCount",
32-
"containsPii",
33-
"containsValidUrl",
34-
"correlatedFeatures",
35-
"customMetric",
36-
"duplicateRowCount",
37-
"emptyFeatures",
38-
"featureDrift",
39-
"featureProfile",
40-
"greatExpectations",
41-
"groupByColumnStatsCheck",
42-
"illFormedRowCount",
43-
"isCode",
44-
"isJson",
45-
"llmRubricV2",
46-
"labelDrift",
47-
"metrics",
48-
"newCategories",
49-
"newLabels",
50-
"nullRowCount",
51-
"ppScore",
52-
"quasiConstantFeatures",
53-
"sentenceLength",
54-
"sizeRatio",
55-
"specialCharacters",
56-
"stringValidation",
57-
"trainValLeakageRowCount",
58-
]
59-
] = FieldInfo(alias="insightName", default=None)
36+
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
6037
"""The insight name to be evaluated."""
6138

6239
insight_parameters: Optional[List[ItemThresholdInsightParameter]] = FieldInfo(
6340
alias="insightParameters", default=None
6441
)
65-
"""The insight parameters.
66-
67-
Required only for some test subtypes. For example, for tests that require a
68-
column name, the insight parameters will be [{'name': 'column_name', 'value':
69-
'Age'}]
70-
"""
42+
"""The insight parameters. Required only for some test subtypes."""
7143

7244
measurement: Optional[str] = None
7345
"""The measurement to be evaluated."""
@@ -196,4 +168,6 @@ class Item(BaseModel):
196168

197169
class TestListResponse(BaseModel):
198170
__test__ = False
171+
api_meta: _Meta = FieldInfo(alias="_meta")
172+
199173
items: List[Item]

0 commit comments

Comments
 (0)