Skip to content
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

release: 0.2.0-alpha.33 #365

Merged
merged 3 commits into from
Nov 1, 2024
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.32"
".": "0.2.0-alpha.33"
}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ 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.33 (2024-10-31)

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

### Features

* **api:** manual updates ([#364](https://github.com/openlayer-ai/openlayer-python/issues/364)) ([f14669b](https://github.com/openlayer-ai/openlayer-python/commit/f14669be5f6790af961657b4d7c8f8dca2371f30))


### Bug Fixes

* **internal:** remove stale files ([52247af](https://github.com/openlayer-ai/openlayer-python/commit/52247affd27056cbda7a8b8da1d7ca0b9f9253a9))

## 0.2.0-alpha.32 (2024-10-31)

Full Changelog: [v0.2.0-alpha.31...v0.2.0-alpha.32](https://github.com/openlayer-ai/openlayer-python/compare/v0.2.0-alpha.31...v0.2.0-alpha.32)
Expand Down
13 changes: 2 additions & 11 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ Methods:
Types:

```python
from openlayer.types.projects import CommitListResponse
from openlayer.types.projects import CommitCreateResponse, CommitListResponse
```

Methods:

- <code title="post /projects/{projectId}/versions">client.projects.commits.<a href="./src/openlayer/resources/projects/commits.py">create</a>(project_id, \*\*<a href="src/openlayer/types/projects/commit_create_params.py">params</a>) -> <a href="./src/openlayer/types/projects/commit_create_response.py">CommitCreateResponse</a></code>
- <code title="get /projects/{projectId}/versions">client.projects.commits.<a href="./src/openlayer/resources/projects/commits.py">list</a>(project_id, \*\*<a href="src/openlayer/types/projects/commit_list_params.py">params</a>) -> <a href="./src/openlayer/types/projects/commit_list_response.py">CommitListResponse</a></code>

## InferencePipelines
Expand All @@ -38,16 +39,6 @@ Methods:

# Commits

Types:

```python
from openlayer.types import CommitCreateResponse
```

Methods:

- <code title="post /projects/{projectId}/versions">client.commits.<a href="./src/openlayer/resources/commits/commits.py">create</a>(project_id, \*\*<a href="src/openlayer/types/commit_create_params.py">params</a>) -> <a href="./src/openlayer/types/commit_create_response.py">CommitCreateResponse</a></code>

## TestResults

Types:
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.32"
version = "0.2.0-alpha.33"
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.32" # x-release-please-version
__version__ = "0.2.0-alpha.33" # x-release-please-version
142 changes: 0 additions & 142 deletions src/openlayer/resources/commits/commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,8 @@

from __future__ import annotations

from typing import Optional

import httpx

from ...types import commit_create_params
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._utils import (
maybe_transform,
async_maybe_transform,
)
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from .test_results import (
TestResultsResource,
AsyncTestResultsResource,
Expand All @@ -28,8 +12,6 @@
TestResultsResourceWithStreamingResponse,
AsyncTestResultsResourceWithStreamingResponse,
)
from ..._base_client import make_request_options
from ...types.commit_create_response import CommitCreateResponse

__all__ = ["CommitsResource", "AsyncCommitsResource"]

Expand Down Expand Up @@ -58,60 +40,6 @@ def with_streaming_response(self) -> CommitsResourceWithStreamingResponse:
"""
return CommitsResourceWithStreamingResponse(self)

def create(
self,
project_id: str,
*,
commit: commit_create_params.Commit,
storage_uri: str,
archived: Optional[bool] | NotGiven = NOT_GIVEN,
deployment_status: str | NotGiven = NOT_GIVEN,
# 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,
) -> CommitCreateResponse:
"""
Create a new commit (project version) in a project.

Args:
commit: The details of a commit (project version).

storage_uri: The storage URI where the commit bundle is stored.

archived: Whether the commit is archived.

deployment_status: The deployment status associated with the commit's model.

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._post(
f"/projects/{project_id}/versions",
body=maybe_transform(
{
"commit": commit,
"storage_uri": storage_uri,
"archived": archived,
"deployment_status": deployment_status,
},
commit_create_params.CommitCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=CommitCreateResponse,
)


class AsyncCommitsResource(AsyncAPIResource):
@cached_property
Expand All @@ -137,69 +65,11 @@ def with_streaming_response(self) -> AsyncCommitsResourceWithStreamingResponse:
"""
return AsyncCommitsResourceWithStreamingResponse(self)

async def create(
self,
project_id: str,
*,
commit: commit_create_params.Commit,
storage_uri: str,
archived: Optional[bool] | NotGiven = NOT_GIVEN,
deployment_status: str | NotGiven = NOT_GIVEN,
# 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,
) -> CommitCreateResponse:
"""
Create a new commit (project version) in a project.

Args:
commit: The details of a commit (project version).

storage_uri: The storage URI where the commit bundle is stored.

archived: Whether the commit is archived.

deployment_status: The deployment status associated with the commit's model.

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._post(
f"/projects/{project_id}/versions",
body=await async_maybe_transform(
{
"commit": commit,
"storage_uri": storage_uri,
"archived": archived,
"deployment_status": deployment_status,
},
commit_create_params.CommitCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=CommitCreateResponse,
)


class CommitsResourceWithRawResponse:
def __init__(self, commits: CommitsResource) -> None:
self._commits = commits

self.create = to_raw_response_wrapper(
commits.create,
)

@cached_property
def test_results(self) -> TestResultsResourceWithRawResponse:
return TestResultsResourceWithRawResponse(self._commits.test_results)
Expand All @@ -209,10 +79,6 @@ class AsyncCommitsResourceWithRawResponse:
def __init__(self, commits: AsyncCommitsResource) -> None:
self._commits = commits

self.create = async_to_raw_response_wrapper(
commits.create,
)

@cached_property
def test_results(self) -> AsyncTestResultsResourceWithRawResponse:
return AsyncTestResultsResourceWithRawResponse(self._commits.test_results)
Expand All @@ -222,10 +88,6 @@ class CommitsResourceWithStreamingResponse:
def __init__(self, commits: CommitsResource) -> None:
self._commits = commits

self.create = to_streamed_response_wrapper(
commits.create,
)

@cached_property
def test_results(self) -> TestResultsResourceWithStreamingResponse:
return TestResultsResourceWithStreamingResponse(self._commits.test_results)
Expand All @@ -235,10 +97,6 @@ class AsyncCommitsResourceWithStreamingResponse:
def __init__(self, commits: AsyncCommitsResource) -> None:
self._commits = commits

self.create = async_to_streamed_response_wrapper(
commits.create,
)

@cached_property
def test_results(self) -> AsyncTestResultsResourceWithStreamingResponse:
return AsyncTestResultsResourceWithStreamingResponse(self._commits.test_results)
Loading