Skip to content

release: 0.2.0-alpha.59 #460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.2.0-alpha.58"
".": "0.2.0-alpha.59"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 17
openapi_spec_hash: 8827ead72aa0c635ccafac5e008fe247
config_hash: 087e6b8013c398a6d24031d24594fdec
configured_endpoints: 18
openapi_spec_hash: 4f09f95fd31c148d1be80b7e643346ce
config_hash: 30422a4611d93ca69e4f1aff60b9ddb5
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.2.0-alpha.59 (2025-04-25)

Full Changelog: [v0.2.0-alpha.58...v0.2.0-alpha.59](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.58...v0.2.0-alpha.59)

### Features

* **api:** api update ([fb9c6ee](https://github.com/openlayer-ai/openlayer-python/commit/fb9c6ee1555b764a00c313ef0cd0520782de2e09))
* **api:** api update ([1a25da2](https://github.com/openlayer-ai/openlayer-python/commit/1a25da24c4c3c0fd589348718425d4b61d1d1298))
* **api:** expose test update endpoint ([ef1427e](https://github.com/openlayer-ai/openlayer-python/commit/ef1427ebc91a1f569b68f4b853758cdc7adac586))

## 0.2.0-alpha.58 (2025-04-24)

Full Changelog: [v0.2.0-alpha.57...v0.2.0-alpha.58](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.57...v0.2.0-alpha.58)
Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ Methods:
Types:

```python
from openlayer.types.projects import TestCreateResponse, TestListResponse
from openlayer.types.projects import TestCreateResponse, TestUpdateResponse, TestListResponse
```

Methods:

- <code title="post /projects/{projectId}/tests">client.projects.tests.<a href="./src/openlayer/resources/projects/tests.py">create</a>(project_id, \*\*<a href="src/openlayer/types/projects/test_create_params.py">params</a>) -> <a href="./src/openlayer/types/projects/test_create_response.py">TestCreateResponse</a></code>
- <code title="put /projects/{projectId}/tests">client.projects.tests.<a href="./src/openlayer/resources/projects/tests.py">update</a>(project_id, \*\*<a href="src/openlayer/types/projects/test_update_params.py">params</a>) -> <a href="./src/openlayer/types/projects/test_update_response.py">TestUpdateResponse</a></code>
- <code title="get /projects/{projectId}/tests">client.projects.tests.<a href="./src/openlayer/resources/projects/tests.py">list</a>(project_id, \*\*<a href="src/openlayer/types/projects/test_list_params.py">params</a>) -> <a href="./src/openlayer/types/projects/test_list_response.py">TestListResponse</a></code>

# Commits
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openlayer"
version = "0.2.0-alpha.58"
version = "0.2.0-alpha.59"
description = "The official Python library for the openlayer API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openlayer/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openlayer"
__version__ = "0.2.0-alpha.58" # x-release-please-version
__version__ = "0.2.0-alpha.59" # x-release-please-version
85 changes: 84 additions & 1 deletion src/openlayer/resources/projects/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
from ...types.projects import test_list_params, test_create_params
from ...types.projects import test_list_params, test_create_params, test_update_params
from ...types.projects.test_list_response import TestListResponse
from ...types.projects.test_create_response import TestCreateResponse
from ...types.projects.test_update_response import TestUpdateResponse

__all__ = ["TestsResource", "AsyncTestsResource"]

Expand Down Expand Up @@ -178,6 +179,41 @@ def create(
cast_to=TestCreateResponse,
)

def update(
self,
project_id: str,
*,
payloads: Iterable[test_update_params.Payload],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TestUpdateResponse:
"""
Update tests.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not project_id:
raise ValueError(f"Expected a non-empty value for `project_id` but received {project_id!r}")
return self._put(
f"/projects/{project_id}/tests",
body=maybe_transform({"payloads": payloads}, test_update_params.TestUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=TestUpdateResponse,
)

def list(
self,
project_id: str,
Expand Down Expand Up @@ -400,6 +436,41 @@ async def create(
cast_to=TestCreateResponse,
)

async def update(
self,
project_id: str,
*,
payloads: Iterable[test_update_params.Payload],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> TestUpdateResponse:
"""
Update tests.

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not project_id:
raise ValueError(f"Expected a non-empty value for `project_id` but received {project_id!r}")
return await self._put(
f"/projects/{project_id}/tests",
body=await async_maybe_transform({"payloads": payloads}, test_update_params.TestUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=TestUpdateResponse,
)

async def list(
self,
project_id: str,
Expand Down Expand Up @@ -480,6 +551,9 @@ def __init__(self, tests: TestsResource) -> None:
self.create = to_raw_response_wrapper(
tests.create,
)
self.update = to_raw_response_wrapper(
tests.update,
)
self.list = to_raw_response_wrapper(
tests.list,
)
Expand All @@ -492,6 +566,9 @@ def __init__(self, tests: AsyncTestsResource) -> None:
self.create = async_to_raw_response_wrapper(
tests.create,
)
self.update = async_to_raw_response_wrapper(
tests.update,
)
self.list = async_to_raw_response_wrapper(
tests.list,
)
Expand All @@ -506,6 +583,9 @@ def __init__(self, tests: TestsResource) -> None:
self.create = to_streamed_response_wrapper(
tests.create,
)
self.update = to_streamed_response_wrapper(
tests.update,
)
self.list = to_streamed_response_wrapper(
tests.list,
)
Expand All @@ -518,6 +598,9 @@ def __init__(self, tests: AsyncTestsResource) -> None:
self.create = async_to_streamed_response_wrapper(
tests.create,
)
self.update = async_to_streamed_response_wrapper(
tests.update,
)
self.list = async_to_streamed_response_wrapper(
tests.list,
)
46 changes: 44 additions & 2 deletions src/openlayer/types/commits/test_result_list_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,55 @@ class ItemGoalThresholdInsightParameter(BaseModel):


class ItemGoalThreshold(BaseModel):
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
insight_name: Optional[
Literal[
"characterLength",
"classImbalance",
"expectColumnAToBeInColumnB",
"columnAverage",
"columnDrift",
"columnValuesMatch",
"confidenceDistribution",
"conflictingLabelRowCount",
"containsPii",
"containsValidUrl",
"correlatedFeatures",
"customMetric",
"duplicateRowCount",
"emptyFeatures",
"featureDrift",
"featureProfile",
"greatExpectations",
"groupByColumnStatsCheck",
"illFormedRowCount",
"isCode",
"isJson",
"llmRubricV2",
"labelDrift",
"metrics",
"newCategories",
"newLabels",
"nullRowCount",
"ppScore",
"quasiConstantFeatures",
"sentenceLength",
"sizeRatio",
"specialCharacters",
"stringValidation",
"trainValLeakageRowCount",
]
] = FieldInfo(alias="insightName", default=None)
"""The insight name to be evaluated."""

insight_parameters: Optional[List[ItemGoalThresholdInsightParameter]] = FieldInfo(
alias="insightParameters", default=None
)
"""The insight parameters. Required only for some test subtypes."""
"""The insight parameters.

Required only for some test subtypes. For example, for tests that require a
column name, the insight parameters will be [{'name': 'column_name', 'value':
'Age'}]
"""

measurement: Optional[str] = None
"""The measurement to be evaluated."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,55 @@ class ItemGoalThresholdInsightParameter(BaseModel):


class ItemGoalThreshold(BaseModel):
insight_name: Optional[str] = FieldInfo(alias="insightName", default=None)
insight_name: Optional[
Literal[
"characterLength",
"classImbalance",
"expectColumnAToBeInColumnB",
"columnAverage",
"columnDrift",
"columnValuesMatch",
"confidenceDistribution",
"conflictingLabelRowCount",
"containsPii",
"containsValidUrl",
"correlatedFeatures",
"customMetric",
"duplicateRowCount",
"emptyFeatures",
"featureDrift",
"featureProfile",
"greatExpectations",
"groupByColumnStatsCheck",
"illFormedRowCount",
"isCode",
"isJson",
"llmRubricV2",
"labelDrift",
"metrics",
"newCategories",
"newLabels",
"nullRowCount",
"ppScore",
"quasiConstantFeatures",
"sentenceLength",
"sizeRatio",
"specialCharacters",
"stringValidation",
"trainValLeakageRowCount",
]
] = FieldInfo(alias="insightName", default=None)
"""The insight name to be evaluated."""

insight_parameters: Optional[List[ItemGoalThresholdInsightParameter]] = FieldInfo(
alias="insightParameters", default=None
)
"""The insight parameters. Required only for some test subtypes."""
"""The insight parameters.

Required only for some test subtypes. For example, for tests that require a
column name, the insight parameters will be [{'name': 'column_name', 'value':
'Age'}]
"""

measurement: Optional[str] = None
"""The measurement to be evaluated."""
Expand Down
2 changes: 2 additions & 0 deletions src/openlayer/types/projects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
from .commit_list_params import CommitListParams as CommitListParams
from .test_create_params import TestCreateParams as TestCreateParams
from .test_list_response import TestListResponse as TestListResponse
from .test_update_params import TestUpdateParams as TestUpdateParams
from .commit_create_params import CommitCreateParams as CommitCreateParams
from .commit_list_response import CommitListResponse as CommitListResponse
from .test_create_response import TestCreateResponse as TestCreateResponse
from .test_update_response import TestUpdateResponse as TestUpdateResponse
from .commit_create_response import CommitCreateResponse as CommitCreateResponse
from .inference_pipeline_list_params import InferencePipelineListParams as InferencePipelineListParams
from .inference_pipeline_create_params import InferencePipelineCreateParams as InferencePipelineCreateParams
Expand Down
47 changes: 45 additions & 2 deletions src/openlayer/types/projects/test_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,56 @@ class ThresholdInsightParameter(TypedDict, total=False):


class Threshold(TypedDict, total=False):
insight_name: Annotated[str, PropertyInfo(alias="insightName")]
insight_name: Annotated[
Literal[
"characterLength",
"classImbalance",
"expectColumnAToBeInColumnB",
"columnAverage",
"columnDrift",
"columnValuesMatch",
"confidenceDistribution",
"conflictingLabelRowCount",
"containsPii",
"containsValidUrl",
"correlatedFeatures",
"customMetric",
"duplicateRowCount",
"emptyFeatures",
"featureDrift",
"featureProfile",
"greatExpectations",
"groupByColumnStatsCheck",
"illFormedRowCount",
"isCode",
"isJson",
"llmRubricV2",
"labelDrift",
"metrics",
"newCategories",
"newLabels",
"nullRowCount",
"ppScore",
"quasiConstantFeatures",
"sentenceLength",
"sizeRatio",
"specialCharacters",
"stringValidation",
"trainValLeakageRowCount",
],
PropertyInfo(alias="insightName"),
]
"""The insight name to be evaluated."""

insight_parameters: Annotated[
Optional[Iterable[ThresholdInsightParameter]], PropertyInfo(alias="insightParameters")
]
"""The insight parameters. Required only for some test subtypes."""
"""The insight parameters.

Required only for some test subtypes. For example, for tests that require a
column name, the insight parameters will be [{'name': 'column_name', 'value':
'Age'}]
"""

measurement: str
"""The measurement to be evaluated."""
Expand Down
Loading