Skip to content

Commit 50a355e

Browse files
authored
Merge pull request #11 from onkernel/release-please--branches--main--changes--next
release: 0.1.0-alpha.9
2 parents e428c7f + 53cad92 commit 50a355e

File tree

10 files changed

+71
-29
lines changed

10 files changed

+71
-29
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.8"
2+
".": "0.1.0-alpha.9"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 4
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-2af763aab4c314b382e1123edc4ee3d51c0fe7977730ce6776b9fb09b29fe291.yml
3-
openapi_spec_hash: be02256478be81fa3f649076879850bc
4-
config_hash: eab40627b734534462ae3b8ccd8b263b
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-07d481d1498bf9677437b555e9ec2d843d50107faa7501e4c430a32b1f3c3343.yml
3+
openapi_spec_hash: 296f78d82afbac95fad12c5eabd71f18
4+
config_hash: 2c8351ba6611ce4a352e248405783846

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.1.0-alpha.9 (2025-05-14)
4+
5+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([472443c](https://github.com/onkernel/kernel-python-sdk/commit/472443c0fc689a2a1e6e5177fc74ca78e556a0d6))
10+
311
## 0.1.0-alpha.8 (2025-05-12)
412

513
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/onkernel/kernel-python-sdk/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ client = Kernel(
3434
)
3535

3636
response = client.apps.deploy(
37+
entrypoint_rel_path="app.py",
3738
file=b"REPLACE_ME",
3839
version="REPLACE_ME",
3940
)
@@ -63,6 +64,7 @@ client = AsyncKernel(
6364

6465
async def main() -> None:
6566
response = await client.apps.deploy(
67+
entrypoint_rel_path="app.py",
6668
file=b"REPLACE_ME",
6769
version="REPLACE_ME",
6870
)
@@ -94,6 +96,7 @@ from kernel import Kernel
9496
client = Kernel()
9597

9698
client.apps.deploy(
99+
entrypoint_rel_path="app.py",
97100
file=Path("/path/to/file"),
98101
)
99102
```
@@ -117,6 +120,7 @@ client = Kernel()
117120

118121
try:
119122
client.apps.deploy(
123+
entrypoint_rel_path="app.py",
120124
file=b"REPLACE_ME",
121125
version="REPLACE_ME",
122126
)
@@ -163,6 +167,7 @@ client = Kernel(
163167

164168
# Or, configure per-request:
165169
client.with_options(max_retries=5).apps.deploy(
170+
entrypoint_rel_path="app.py",
166171
file=b"REPLACE_ME",
167172
version="REPLACE_ME",
168173
)
@@ -189,6 +194,7 @@ client = Kernel(
189194

190195
# Override per-request:
191196
client.with_options(timeout=5.0).apps.deploy(
197+
entrypoint_rel_path="app.py",
192198
file=b"REPLACE_ME",
193199
version="REPLACE_ME",
194200
)
@@ -233,6 +239,7 @@ from kernel import Kernel
233239

234240
client = Kernel()
235241
response = client.apps.with_raw_response.deploy(
242+
entrypoint_rel_path="app.py",
236243
file=b"REPLACE_ME",
237244
version="REPLACE_ME",
238245
)
@@ -254,6 +261,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
254261

255262
```python
256263
with client.apps.with_streaming_response.deploy(
264+
entrypoint_rel_path="app.py",
257265
file=b"REPLACE_ME",
258266
version="REPLACE_ME",
259267
) as response:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "kernel"
3-
version = "0.1.0-alpha.8"
3+
version = "0.1.0-alpha.9"
44
description = "The official Python library for the kernel API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/kernel/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "kernel"
4-
__version__ = "0.1.0-alpha.8" # x-release-please-version
4+
__version__ = "0.1.0-alpha.9" # x-release-please-version

src/kernel/resources/apps.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def with_streaming_response(self) -> AppsResourceWithStreamingResponse:
4949
def deploy(
5050
self,
5151
*,
52+
entrypoint_rel_path: str,
5253
file: FileTypes,
53-
entrypoint_rel_path: str | NotGiven = NOT_GIVEN,
5454
force: Literal["true", "false"] | NotGiven = NOT_GIVEN,
5555
region: Literal["aws.us-east-1a"] | NotGiven = NOT_GIVEN,
5656
version: str | NotGiven = NOT_GIVEN,
@@ -65,10 +65,10 @@ def deploy(
6565
Deploy a new application
6666
6767
Args:
68-
file: ZIP file containing the application source directory
69-
7068
entrypoint_rel_path: Relative path to the entrypoint of the application
7169
70+
file: ZIP file containing the application source directory
71+
7272
force: Allow overwriting an existing app version
7373
7474
region: Region for deployment. Currently we only support "aws.us-east-1a"
@@ -85,8 +85,8 @@ def deploy(
8585
"""
8686
body = deepcopy_minimal(
8787
{
88-
"file": file,
8988
"entrypoint_rel_path": entrypoint_rel_path,
89+
"file": file,
9090
"force": force,
9191
"region": region,
9292
"version": version,
@@ -215,8 +215,8 @@ def with_streaming_response(self) -> AsyncAppsResourceWithStreamingResponse:
215215
async def deploy(
216216
self,
217217
*,
218+
entrypoint_rel_path: str,
218219
file: FileTypes,
219-
entrypoint_rel_path: str | NotGiven = NOT_GIVEN,
220220
force: Literal["true", "false"] | NotGiven = NOT_GIVEN,
221221
region: Literal["aws.us-east-1a"] | NotGiven = NOT_GIVEN,
222222
version: str | NotGiven = NOT_GIVEN,
@@ -231,10 +231,10 @@ async def deploy(
231231
Deploy a new application
232232
233233
Args:
234-
file: ZIP file containing the application source directory
235-
236234
entrypoint_rel_path: Relative path to the entrypoint of the application
237235
236+
file: ZIP file containing the application source directory
237+
238238
force: Allow overwriting an existing app version
239239
240240
region: Region for deployment. Currently we only support "aws.us-east-1a"
@@ -251,8 +251,8 @@ async def deploy(
251251
"""
252252
body = deepcopy_minimal(
253253
{
254-
"file": file,
255254
"entrypoint_rel_path": entrypoint_rel_path,
255+
"file": file,
256256
"force": force,
257257
"region": region,
258258
"version": version,

src/kernel/types/app_deploy_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212

1313
class AppDeployParams(TypedDict, total=False):
14+
entrypoint_rel_path: Required[Annotated[str, PropertyInfo(alias="entrypointRelPath")]]
15+
"""Relative path to the entrypoint of the application"""
16+
1417
file: Required[FileTypes]
1518
"""ZIP file containing the application source directory"""
1619

17-
entrypoint_rel_path: Annotated[str, PropertyInfo(alias="entrypointRelPath")]
18-
"""Relative path to the entrypoint of the application"""
19-
2020
force: Literal["true", "false"]
2121
"""Allow overwriting an existing app version"""
2222

tests/api_resources/test_apps.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class TestApps:
2525
@parametrize
2626
def test_method_deploy(self, client: Kernel) -> None:
2727
app = client.apps.deploy(
28+
entrypoint_rel_path="app.py",
2829
file=b"raw file contents",
2930
)
3031
assert_matches_type(AppDeployResponse, app, path=["response"])
@@ -33,8 +34,8 @@ def test_method_deploy(self, client: Kernel) -> None:
3334
@parametrize
3435
def test_method_deploy_with_all_params(self, client: Kernel) -> None:
3536
app = client.apps.deploy(
36-
file=b"raw file contents",
3737
entrypoint_rel_path="app.py",
38+
file=b"raw file contents",
3839
force="false",
3940
region="aws.us-east-1a",
4041
version="1.0.0",
@@ -45,6 +46,7 @@ def test_method_deploy_with_all_params(self, client: Kernel) -> None:
4546
@parametrize
4647
def test_raw_response_deploy(self, client: Kernel) -> None:
4748
response = client.apps.with_raw_response.deploy(
49+
entrypoint_rel_path="app.py",
4850
file=b"raw file contents",
4951
)
5052

@@ -57,6 +59,7 @@ def test_raw_response_deploy(self, client: Kernel) -> None:
5759
@parametrize
5860
def test_streaming_response_deploy(self, client: Kernel) -> None:
5961
with client.apps.with_streaming_response.deploy(
62+
entrypoint_rel_path="app.py",
6063
file=b"raw file contents",
6164
) as response:
6265
assert not response.is_closed
@@ -160,6 +163,7 @@ class TestAsyncApps:
160163
@parametrize
161164
async def test_method_deploy(self, async_client: AsyncKernel) -> None:
162165
app = await async_client.apps.deploy(
166+
entrypoint_rel_path="app.py",
163167
file=b"raw file contents",
164168
)
165169
assert_matches_type(AppDeployResponse, app, path=["response"])
@@ -168,8 +172,8 @@ async def test_method_deploy(self, async_client: AsyncKernel) -> None:
168172
@parametrize
169173
async def test_method_deploy_with_all_params(self, async_client: AsyncKernel) -> None:
170174
app = await async_client.apps.deploy(
171-
file=b"raw file contents",
172175
entrypoint_rel_path="app.py",
176+
file=b"raw file contents",
173177
force="false",
174178
region="aws.us-east-1a",
175179
version="1.0.0",
@@ -180,6 +184,7 @@ async def test_method_deploy_with_all_params(self, async_client: AsyncKernel) ->
180184
@parametrize
181185
async def test_raw_response_deploy(self, async_client: AsyncKernel) -> None:
182186
response = await async_client.apps.with_raw_response.deploy(
187+
entrypoint_rel_path="app.py",
183188
file=b"raw file contents",
184189
)
185190

@@ -192,6 +197,7 @@ async def test_raw_response_deploy(self, async_client: AsyncKernel) -> None:
192197
@parametrize
193198
async def test_streaming_response_deploy(self, async_client: AsyncKernel) -> None:
194199
async with async_client.apps.with_streaming_response.deploy(
200+
entrypoint_rel_path="app.py",
195201
file=b"raw file contents",
196202
) as response:
197203
assert not response.is_closed

tests/test_client.py

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,12 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No
721721
with pytest.raises(APITimeoutError):
722722
self.client.post(
723723
"/apps/deploy",
724-
body=cast(object, maybe_transform(dict(file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams)),
724+
body=cast(
725+
object,
726+
maybe_transform(
727+
dict(entrypoint_rel_path="app.py", file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams
728+
),
729+
),
725730
cast_to=httpx.Response,
726731
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
727732
)
@@ -737,7 +742,12 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non
737742
with pytest.raises(APIStatusError):
738743
self.client.post(
739744
"/apps/deploy",
740-
body=cast(object, maybe_transform(dict(file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams)),
745+
body=cast(
746+
object,
747+
maybe_transform(
748+
dict(entrypoint_rel_path="app.py", file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams
749+
),
750+
),
741751
cast_to=httpx.Response,
742752
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
743753
)
@@ -770,7 +780,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
770780

771781
respx_mock.post("/apps/deploy").mock(side_effect=retry_handler)
772782

773-
response = client.apps.with_raw_response.deploy(file=b"raw file contents")
783+
response = client.apps.with_raw_response.deploy(entrypoint_rel_path="app.py", file=b"raw file contents")
774784

775785
assert response.retries_taken == failures_before_success
776786
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -795,7 +805,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
795805
respx_mock.post("/apps/deploy").mock(side_effect=retry_handler)
796806

797807
response = client.apps.with_raw_response.deploy(
798-
file=b"raw file contents", extra_headers={"x-stainless-retry-count": Omit()}
808+
entrypoint_rel_path="app.py", file=b"raw file contents", extra_headers={"x-stainless-retry-count": Omit()}
799809
)
800810

801811
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
@@ -820,7 +830,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
820830
respx_mock.post("/apps/deploy").mock(side_effect=retry_handler)
821831

822832
response = client.apps.with_raw_response.deploy(
823-
file=b"raw file contents", extra_headers={"x-stainless-retry-count": "42"}
833+
entrypoint_rel_path="app.py", file=b"raw file contents", extra_headers={"x-stainless-retry-count": "42"}
824834
)
825835

826836
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
@@ -1513,7 +1523,12 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter)
15131523
with pytest.raises(APITimeoutError):
15141524
await self.client.post(
15151525
"/apps/deploy",
1516-
body=cast(object, maybe_transform(dict(file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams)),
1526+
body=cast(
1527+
object,
1528+
maybe_transform(
1529+
dict(entrypoint_rel_path="app.py", file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams
1530+
),
1531+
),
15171532
cast_to=httpx.Response,
15181533
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
15191534
)
@@ -1529,7 +1544,12 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter)
15291544
with pytest.raises(APIStatusError):
15301545
await self.client.post(
15311546
"/apps/deploy",
1532-
body=cast(object, maybe_transform(dict(file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams)),
1547+
body=cast(
1548+
object,
1549+
maybe_transform(
1550+
dict(entrypoint_rel_path="app.py", file=b"REPLACE_ME", version="REPLACE_ME"), AppDeployParams
1551+
),
1552+
),
15331553
cast_to=httpx.Response,
15341554
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
15351555
)
@@ -1563,7 +1583,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
15631583

15641584
respx_mock.post("/apps/deploy").mock(side_effect=retry_handler)
15651585

1566-
response = await client.apps.with_raw_response.deploy(file=b"raw file contents")
1586+
response = await client.apps.with_raw_response.deploy(entrypoint_rel_path="app.py", file=b"raw file contents")
15671587

15681588
assert response.retries_taken == failures_before_success
15691589
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
@@ -1589,7 +1609,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
15891609
respx_mock.post("/apps/deploy").mock(side_effect=retry_handler)
15901610

15911611
response = await client.apps.with_raw_response.deploy(
1592-
file=b"raw file contents", extra_headers={"x-stainless-retry-count": Omit()}
1612+
entrypoint_rel_path="app.py", file=b"raw file contents", extra_headers={"x-stainless-retry-count": Omit()}
15931613
)
15941614

15951615
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
@@ -1615,7 +1635,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
16151635
respx_mock.post("/apps/deploy").mock(side_effect=retry_handler)
16161636

16171637
response = await client.apps.with_raw_response.deploy(
1618-
file=b"raw file contents", extra_headers={"x-stainless-retry-count": "42"}
1638+
entrypoint_rel_path="app.py", file=b"raw file contents", extra_headers={"x-stainless-retry-count": "42"}
16191639
)
16201640

16211641
assert response.http_request.headers.get("x-stainless-retry-count") == "42"

0 commit comments

Comments
 (0)