diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e8285b7..4f9005e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.5" + ".": "0.1.0-alpha.6" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 1a7891f..42510a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 4 +configured_endpoints: 3 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d168b58fcf39dbd0458d132091793d3e2d0930070b7dda2d5f7f1baff20dd31b.yml openapi_spec_hash: b7e0fd7ee1656d7dbad57209d1584d92 -config_hash: 2d282609080a6011e3f6222451f72237 +config_hash: 9139d1eb064baf60fd2265aac382f097 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a60606..a11dbaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.6 (2025-05-11) + +Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.5...v0.1.0-alpha.6) + +### Features + +* **api:** update via SDK Studio ([d2d465e](https://github.com/onkernel/kernel-python-sdk/commit/d2d465ee112484eb9acd1b5f8714bc5650f2b4de)) + ## 0.1.0-alpha.5 (2025-05-10) Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.4...v0.1.0-alpha.5) diff --git a/api.md b/api.md index ec9b481..fe6fb48 100644 --- a/api.md +++ b/api.md @@ -3,14 +3,13 @@ Types: ```python -from kernel.types import AppDeployResponse, AppInvokeResponse, AppRetrieveInvocationResponse +from kernel.types import AppDeployResponse, AppInvokeResponse ``` Methods: - client.apps.deploy(\*\*params) -> AppDeployResponse - client.apps.invoke(\*\*params) -> AppInvokeResponse -- client.apps.retrieve_invocation(id) -> AppRetrieveInvocationResponse # Browser diff --git a/pyproject.toml b/pyproject.toml index 1bca88c..a714f44 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.1.0-alpha.5" +version = "0.1.0-alpha.6" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index 55b53c6..2451c60 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.1.0-alpha.5" # x-release-please-version +__version__ = "0.1.0-alpha.6" # x-release-please-version diff --git a/src/kernel/resources/apps.py b/src/kernel/resources/apps.py index 997a27f..24cc154 100644 --- a/src/kernel/resources/apps.py +++ b/src/kernel/resources/apps.py @@ -20,7 +20,6 @@ from .._base_client import make_request_options from ..types.app_deploy_response import AppDeployResponse from ..types.app_invoke_response import AppInvokeResponse -from ..types.app_retrieve_invocation_response import AppRetrieveInvocationResponse __all__ = ["AppsResource", "AsyncAppsResource"] @@ -153,39 +152,6 @@ def invoke( cast_to=AppInvokeResponse, ) - def retrieve_invocation( - self, - id: str, - *, - # 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, - ) -> AppRetrieveInvocationResponse: - """ - Get an app invocation by id - - 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 id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return self._get( - f"/apps/invocations/{id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=AppRetrieveInvocationResponse, - ) - class AsyncAppsResource(AsyncAPIResource): @cached_property @@ -315,39 +281,6 @@ async def invoke( cast_to=AppInvokeResponse, ) - async def retrieve_invocation( - self, - id: str, - *, - # 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, - ) -> AppRetrieveInvocationResponse: - """ - Get an app invocation by id - - 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 id: - raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return await self._get( - f"/apps/invocations/{id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=AppRetrieveInvocationResponse, - ) - class AppsResourceWithRawResponse: def __init__(self, apps: AppsResource) -> None: @@ -359,9 +292,6 @@ def __init__(self, apps: AppsResource) -> None: self.invoke = to_raw_response_wrapper( apps.invoke, ) - self.retrieve_invocation = to_raw_response_wrapper( - apps.retrieve_invocation, - ) class AsyncAppsResourceWithRawResponse: @@ -374,9 +304,6 @@ def __init__(self, apps: AsyncAppsResource) -> None: self.invoke = async_to_raw_response_wrapper( apps.invoke, ) - self.retrieve_invocation = async_to_raw_response_wrapper( - apps.retrieve_invocation, - ) class AppsResourceWithStreamingResponse: @@ -389,9 +316,6 @@ def __init__(self, apps: AppsResource) -> None: self.invoke = to_streamed_response_wrapper( apps.invoke, ) - self.retrieve_invocation = to_streamed_response_wrapper( - apps.retrieve_invocation, - ) class AsyncAppsResourceWithStreamingResponse: @@ -404,6 +328,3 @@ def __init__(self, apps: AsyncAppsResource) -> None: self.invoke = async_to_streamed_response_wrapper( apps.invoke, ) - self.retrieve_invocation = async_to_streamed_response_wrapper( - apps.retrieve_invocation, - ) diff --git a/src/kernel/types/__init__.py b/src/kernel/types/__init__.py index 9577c2f..2403d11 100644 --- a/src/kernel/types/__init__.py +++ b/src/kernel/types/__init__.py @@ -7,4 +7,3 @@ from .app_deploy_response import AppDeployResponse as AppDeployResponse from .app_invoke_response import AppInvokeResponse as AppInvokeResponse from .browser_create_session_response import BrowserCreateSessionResponse as BrowserCreateSessionResponse -from .app_retrieve_invocation_response import AppRetrieveInvocationResponse as AppRetrieveInvocationResponse diff --git a/src/kernel/types/app_retrieve_invocation_response.py b/src/kernel/types/app_retrieve_invocation_response.py deleted file mode 100644 index 8b3de1f..0000000 --- a/src/kernel/types/app_retrieve_invocation_response.py +++ /dev/null @@ -1,25 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel - -__all__ = ["AppRetrieveInvocationResponse"] - - -class AppRetrieveInvocationResponse(BaseModel): - id: str - - app_name: str = FieldInfo(alias="appName") - - finished_at: Optional[str] = FieldInfo(alias="finishedAt", default=None) - - input: str - - output: str - - started_at: str = FieldInfo(alias="startedAt") - - status: str diff --git a/tests/api_resources/test_apps.py b/tests/api_resources/test_apps.py index 26d0ef1..962d7aa 100644 --- a/tests/api_resources/test_apps.py +++ b/tests/api_resources/test_apps.py @@ -9,11 +9,7 @@ from kernel import Kernel, AsyncKernel from tests.utils import assert_matches_type -from kernel.types import ( - AppDeployResponse, - AppInvokeResponse, - AppRetrieveInvocationResponse, -) +from kernel.types import AppDeployResponse, AppInvokeResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -115,48 +111,6 @@ def test_streaming_response_invoke(self, client: Kernel) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip() - @parametrize - def test_method_retrieve_invocation(self, client: Kernel) -> None: - app = client.apps.retrieve_invocation( - "id", - ) - assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_retrieve_invocation(self, client: Kernel) -> None: - response = client.apps.with_raw_response.retrieve_invocation( - "id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - app = response.parse() - assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_retrieve_invocation(self, client: Kernel) -> None: - with client.apps.with_streaming_response.retrieve_invocation( - "id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - app = response.parse() - assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_retrieve_invocation(self, client: Kernel) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - client.apps.with_raw_response.retrieve_invocation( - "", - ) - class TestAsyncApps: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -254,45 +208,3 @@ async def test_streaming_response_invoke(self, async_client: AsyncKernel) -> Non assert_matches_type(AppInvokeResponse, app, path=["response"]) assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_method_retrieve_invocation(self, async_client: AsyncKernel) -> None: - app = await async_client.apps.retrieve_invocation( - "id", - ) - assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_retrieve_invocation(self, async_client: AsyncKernel) -> None: - response = await async_client.apps.with_raw_response.retrieve_invocation( - "id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - app = await response.parse() - assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_retrieve_invocation(self, async_client: AsyncKernel) -> None: - async with async_client.apps.with_streaming_response.retrieve_invocation( - "id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - app = await response.parse() - assert_matches_type(AppRetrieveInvocationResponse, app, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_retrieve_invocation(self, async_client: AsyncKernel) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): - await async_client.apps.with_raw_response.retrieve_invocation( - "", - )