Skip to content

Commit f53fab3

Browse files
feat(api): api update
1 parent 7a554fd commit f53fab3

6 files changed

Lines changed: 122 additions & 2 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 18
2-
openapi_spec_hash: 8cd3908ccce472dcb5480c14b290b460
2+
openapi_spec_hash: 539798fac79a1eeebf9ac4faa0492455
33
config_hash: 6dcf08c4324405f152d1da9fc11ab04a

src/openlayer/resources/projects/tests.py

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
10+
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
1111
from ..._utils import maybe_transform, async_maybe_transform
1212
from ..._compat import cached_property
1313
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -100,8 +100,12 @@ def create(
100100
thresholds: Iterable[test_create_params.Threshold],
101101
type: Literal["integrity", "consistency", "performance"],
102102
archived: bool | Omit = omit,
103+
default_to_all_pipelines: Optional[bool] | Omit = omit,
103104
delay_window: Optional[float] | Omit = omit,
104105
evaluation_window: Optional[float] | Omit = omit,
106+
exclude_pipelines: Optional[SequenceNotStr[str]] | Omit = omit,
107+
include_historical_data: Optional[bool] | Omit = omit,
108+
include_pipelines: Optional[SequenceNotStr[str]] | Omit = omit,
105109
uses_ml_model: bool | Omit = omit,
106110
uses_production_data: bool | Omit = omit,
107111
uses_reference_dataset: bool | Omit = omit,
@@ -128,11 +132,23 @@ def create(
128132
129133
archived: Whether the test is archived.
130134
135+
default_to_all_pipelines: Whether to apply the test to all pipelines (data sources) or to a specific set
136+
of pipelines. Only applies to tests that use production data.
137+
131138
delay_window: The delay window in seconds. Only applies to tests that use production data.
132139
133140
evaluation_window: The evaluation window in seconds. Only applies to tests that use production
134141
data.
135142
143+
exclude_pipelines: Array of pipelines (data sources) to which the test should not be applied. Only
144+
applies to tests that use production data.
145+
146+
include_historical_data: Whether to include historical data in the test result. Only applies to tests
147+
that use production data.
148+
149+
include_pipelines: Array of pipelines (data sources) to which the test should be applied. Only
150+
applies to tests that use production data.
151+
136152
uses_ml_model: Whether the test uses an ML model.
137153
138154
uses_production_data: Whether the test uses production data (monitoring mode only).
@@ -163,8 +179,12 @@ def create(
163179
"thresholds": thresholds,
164180
"type": type,
165181
"archived": archived,
182+
"default_to_all_pipelines": default_to_all_pipelines,
166183
"delay_window": delay_window,
167184
"evaluation_window": evaluation_window,
185+
"exclude_pipelines": exclude_pipelines,
186+
"include_historical_data": include_historical_data,
187+
"include_pipelines": include_pipelines,
168188
"uses_ml_model": uses_ml_model,
169189
"uses_production_data": uses_production_data,
170190
"uses_reference_dataset": uses_reference_dataset,
@@ -357,8 +377,12 @@ async def create(
357377
thresholds: Iterable[test_create_params.Threshold],
358378
type: Literal["integrity", "consistency", "performance"],
359379
archived: bool | Omit = omit,
380+
default_to_all_pipelines: Optional[bool] | Omit = omit,
360381
delay_window: Optional[float] | Omit = omit,
361382
evaluation_window: Optional[float] | Omit = omit,
383+
exclude_pipelines: Optional[SequenceNotStr[str]] | Omit = omit,
384+
include_historical_data: Optional[bool] | Omit = omit,
385+
include_pipelines: Optional[SequenceNotStr[str]] | Omit = omit,
362386
uses_ml_model: bool | Omit = omit,
363387
uses_production_data: bool | Omit = omit,
364388
uses_reference_dataset: bool | Omit = omit,
@@ -385,11 +409,23 @@ async def create(
385409
386410
archived: Whether the test is archived.
387411
412+
default_to_all_pipelines: Whether to apply the test to all pipelines (data sources) or to a specific set
413+
of pipelines. Only applies to tests that use production data.
414+
388415
delay_window: The delay window in seconds. Only applies to tests that use production data.
389416
390417
evaluation_window: The evaluation window in seconds. Only applies to tests that use production
391418
data.
392419
420+
exclude_pipelines: Array of pipelines (data sources) to which the test should not be applied. Only
421+
applies to tests that use production data.
422+
423+
include_historical_data: Whether to include historical data in the test result. Only applies to tests
424+
that use production data.
425+
426+
include_pipelines: Array of pipelines (data sources) to which the test should be applied. Only
427+
applies to tests that use production data.
428+
393429
uses_ml_model: Whether the test uses an ML model.
394430
395431
uses_production_data: Whether the test uses production data (monitoring mode only).
@@ -420,8 +456,12 @@ async def create(
420456
"thresholds": thresholds,
421457
"type": type,
422458
"archived": archived,
459+
"default_to_all_pipelines": default_to_all_pipelines,
423460
"delay_window": delay_window,
424461
"evaluation_window": evaluation_window,
462+
"exclude_pipelines": exclude_pipelines,
463+
"include_historical_data": include_historical_data,
464+
"include_pipelines": include_pipelines,
425465
"uses_ml_model": uses_ml_model,
426466
"uses_production_data": uses_production_data,
427467
"uses_reference_dataset": uses_reference_dataset,

src/openlayer/types/projects/test_create_params.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ class TestCreateParams(TypedDict, total=False):
7373
archived: bool
7474
"""Whether the test is archived."""
7575

76+
default_to_all_pipelines: Annotated[Optional[bool], PropertyInfo(alias="defaultToAllPipelines")]
77+
"""
78+
Whether to apply the test to all pipelines (data sources) or to a specific set
79+
of pipelines. Only applies to tests that use production data.
80+
"""
81+
7682
delay_window: Annotated[Optional[float], PropertyInfo(alias="delayWindow")]
7783
"""The delay window in seconds. Only applies to tests that use production data."""
7884

@@ -82,6 +88,24 @@ class TestCreateParams(TypedDict, total=False):
8288
Only applies to tests that use production data.
8389
"""
8490

91+
exclude_pipelines: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="excludePipelines")]
92+
"""Array of pipelines (data sources) to which the test should not be applied.
93+
94+
Only applies to tests that use production data.
95+
"""
96+
97+
include_historical_data: Annotated[Optional[bool], PropertyInfo(alias="includeHistoricalData")]
98+
"""Whether to include historical data in the test result.
99+
100+
Only applies to tests that use production data.
101+
"""
102+
103+
include_pipelines: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="includePipelines")]
104+
"""Array of pipelines (data sources) to which the test should be applied.
105+
106+
Only applies to tests that use production data.
107+
"""
108+
85109
uses_ml_model: Annotated[bool, PropertyInfo(alias="usesMlModel")]
86110
"""Whether the test uses an ML model."""
87111

src/openlayer/types/projects/test_create_response.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ class TestCreateResponse(BaseModel):
168168
archived: Optional[bool] = None
169169
"""Whether the test is archived."""
170170

171+
default_to_all_pipelines: Optional[bool] = FieldInfo(alias="defaultToAllPipelines", default=None)
172+
"""
173+
Whether to apply the test to all pipelines (data sources) or to a specific set
174+
of pipelines. Only applies to tests that use production data.
175+
"""
176+
171177
delay_window: Optional[float] = FieldInfo(alias="delayWindow", default=None)
172178
"""The delay window in seconds. Only applies to tests that use production data."""
173179

@@ -177,6 +183,24 @@ class TestCreateResponse(BaseModel):
177183
Only applies to tests that use production data.
178184
"""
179185

186+
exclude_pipelines: Optional[List[str]] = FieldInfo(alias="excludePipelines", default=None)
187+
"""Array of pipelines (data sources) to which the test should not be applied.
188+
189+
Only applies to tests that use production data.
190+
"""
191+
192+
include_historical_data: Optional[bool] = FieldInfo(alias="includeHistoricalData", default=None)
193+
"""Whether to include historical data in the test result.
194+
195+
Only applies to tests that use production data.
196+
"""
197+
198+
include_pipelines: Optional[List[str]] = FieldInfo(alias="includePipelines", default=None)
199+
"""Array of pipelines (data sources) to which the test should be applied.
200+
201+
Only applies to tests that use production data.
202+
"""
203+
180204
uses_ml_model: Optional[bool] = FieldInfo(alias="usesMlModel", default=None)
181205
"""Whether the test uses an ML model."""
182206

src/openlayer/types/projects/test_list_response.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@ class Item(BaseModel):
169169
archived: Optional[bool] = None
170170
"""Whether the test is archived."""
171171

172+
default_to_all_pipelines: Optional[bool] = FieldInfo(alias="defaultToAllPipelines", default=None)
173+
"""
174+
Whether to apply the test to all pipelines (data sources) or to a specific set
175+
of pipelines. Only applies to tests that use production data.
176+
"""
177+
172178
delay_window: Optional[float] = FieldInfo(alias="delayWindow", default=None)
173179
"""The delay window in seconds. Only applies to tests that use production data."""
174180

@@ -178,6 +184,24 @@ class Item(BaseModel):
178184
Only applies to tests that use production data.
179185
"""
180186

187+
exclude_pipelines: Optional[List[str]] = FieldInfo(alias="excludePipelines", default=None)
188+
"""Array of pipelines (data sources) to which the test should not be applied.
189+
190+
Only applies to tests that use production data.
191+
"""
192+
193+
include_historical_data: Optional[bool] = FieldInfo(alias="includeHistoricalData", default=None)
194+
"""Whether to include historical data in the test result.
195+
196+
Only applies to tests that use production data.
197+
"""
198+
199+
include_pipelines: Optional[List[str]] = FieldInfo(alias="includePipelines", default=None)
200+
"""Array of pipelines (data sources) to which the test should be applied.
201+
202+
Only applies to tests that use production data.
203+
"""
204+
181205
uses_ml_model: Optional[bool] = FieldInfo(alias="usesMlModel", default=None)
182206
"""Whether the test uses an ML model."""
183207

tests/api_resources/projects/test_tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ def test_method_create_with_all_params(self, client: Openlayer) -> None:
5757
],
5858
type="integrity",
5959
archived=False,
60+
default_to_all_pipelines=True,
6061
delay_window=0,
6162
evaluation_window=3600,
63+
exclude_pipelines=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
64+
include_historical_data=True,
65+
include_pipelines=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
6266
uses_ml_model=False,
6367
uses_production_data=False,
6468
uses_reference_dataset=False,
@@ -249,8 +253,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenlayer)
249253
],
250254
type="integrity",
251255
archived=False,
256+
default_to_all_pipelines=True,
252257
delay_window=0,
253258
evaluation_window=3600,
259+
exclude_pipelines=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
260+
include_historical_data=True,
261+
include_pipelines=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
254262
uses_ml_model=False,
255263
uses_production_data=False,
256264
uses_reference_dataset=False,

0 commit comments

Comments
 (0)