Skip to content

Commit 8c8f67b

Browse files
feat(api): api update (#502)
1 parent 047b2e8 commit 8c8f67b

7 files changed

Lines changed: 22 additions & 29 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 61
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f4e55467750a460852376c0f037c34548a9b72d438b3484b9db0fa62c2573f03.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-9644e0fb22c7f4f55c131356129c4da627ec8aa3a46f5305893e601b961fe1fc.yml

api.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Types:
1212
from runloop_api_client.types import (
1313
BenchmarkCreateParameters,
1414
BenchmarkListView,
15+
BenchmarkRunListView,
1516
BenchmarkRunView,
1617
BenchmarkView,
1718
StartBenchmarkRunParameters,
@@ -27,16 +28,10 @@ Methods:
2728

2829
## Runs
2930

30-
Types:
31-
32-
```python
33-
from runloop_api_client.types.benchmarks import RunListResponse
34-
```
35-
3631
Methods:
3732

3833
- <code title="get /v1/benchmarks/runs/{id}">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
39-
- <code title="get /v1/benchmarks/runs">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmarks/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmarks/run_list_response.py">RunListResponse</a></code>
34+
- <code title="get /v1/benchmarks/runs">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmarks/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_run_list_view.py">BenchmarkRunListView</a></code>
4035
- <code title="post /v1/benchmarks/runs/{id}/complete">client.benchmarks.runs.<a href="./src/runloop_api_client/resources/benchmarks/runs.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
4136

4237
# Blueprints
@@ -215,7 +210,6 @@ Types:
215210
```python
216211
from runloop_api_client.types import (
217212
InputContextParameters,
218-
RepositoryConnectionListView,
219213
ScenarioCreateParameters,
220214
ScenarioEnvironmentParameters,
221215
ScenarioListView,

src/runloop_api_client/resources/benchmarks/runs.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from ..._base_client import make_request_options
2121
from ...types.benchmarks import run_list_params
2222
from ...types.benchmark_run_view import BenchmarkRunView
23-
from ...types.benchmarks.run_list_response import RunListResponse
23+
from ...types.benchmark_run_list_view import BenchmarkRunListView
2424

2525
__all__ = ["RunsResource", "AsyncRunsResource"]
2626

@@ -89,7 +89,7 @@ def list(
8989
extra_query: Query | None = None,
9090
extra_body: Body | None = None,
9191
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
92-
) -> RunListResponse:
92+
) -> BenchmarkRunListView:
9393
"""
9494
List all BenchmarkRuns matching filter.
9595
@@ -121,7 +121,7 @@ def list(
121121
run_list_params.RunListParams,
122122
),
123123
),
124-
cast_to=RunListResponse,
124+
cast_to=BenchmarkRunListView,
125125
)
126126

127127
def complete(
@@ -229,7 +229,7 @@ async def list(
229229
extra_query: Query | None = None,
230230
extra_body: Body | None = None,
231231
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
232-
) -> RunListResponse:
232+
) -> BenchmarkRunListView:
233233
"""
234234
List all BenchmarkRuns matching filter.
235235
@@ -261,7 +261,7 @@ async def list(
261261
run_list_params.RunListParams,
262262
),
263263
),
264-
cast_to=RunListResponse,
264+
cast_to=BenchmarkRunListView,
265265
)
266266

267267
async def complete(

src/runloop_api_client/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from .scenario_create_params import ScenarioCreateParams as ScenarioCreateParams
3131
from .scenario_run_list_view import ScenarioRunListView as ScenarioRunListView
3232
from .benchmark_create_params import BenchmarkCreateParams as BenchmarkCreateParams
33+
from .benchmark_run_list_view import BenchmarkRunListView as BenchmarkRunListView
3334
from .blueprint_create_params import BlueprintCreateParams as BlueprintCreateParams
3435
from .blueprint_preview_params import BlueprintPreviewParams as BlueprintPreviewParams
3536
from .input_context_parameters import InputContextParameters as InputContextParameters

src/runloop_api_client/types/benchmarks/run_list_response.py renamed to src/runloop_api_client/types/benchmark_run_list_view.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from typing import List
44

5-
from ..._models import BaseModel
6-
from ..benchmark_run_view import BenchmarkRunView
5+
from .._models import BaseModel
6+
from .benchmark_run_view import BenchmarkRunView
77

8-
__all__ = ["RunListResponse"]
8+
__all__ = ["BenchmarkRunListView"]
99

1010

11-
class RunListResponse(BaseModel):
11+
class BenchmarkRunListView(BaseModel):
1212
has_more: bool
1313

1414
runs: List[BenchmarkRunView]

src/runloop_api_client/types/benchmarks/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
from __future__ import annotations
44

55
from .run_list_params import RunListParams as RunListParams
6-
from .run_list_response import RunListResponse as RunListResponse

tests/api_resources/benchmarks/test_runs.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
from tests.utils import assert_matches_type
1111
from runloop_api_client import Runloop, AsyncRunloop
12-
from runloop_api_client.types import BenchmarkRunView
13-
from runloop_api_client.types.benchmarks import RunListResponse
12+
from runloop_api_client.types import BenchmarkRunView, BenchmarkRunListView
1413

1514
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1615

@@ -59,15 +58,15 @@ def test_path_params_retrieve(self, client: Runloop) -> None:
5958
@parametrize
6059
def test_method_list(self, client: Runloop) -> None:
6160
run = client.benchmarks.runs.list()
62-
assert_matches_type(RunListResponse, run, path=["response"])
61+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
6362

6463
@parametrize
6564
def test_method_list_with_all_params(self, client: Runloop) -> None:
6665
run = client.benchmarks.runs.list(
6766
limit=0,
6867
starting_after="starting_after",
6968
)
70-
assert_matches_type(RunListResponse, run, path=["response"])
69+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
7170

7271
@parametrize
7372
def test_raw_response_list(self, client: Runloop) -> None:
@@ -76,7 +75,7 @@ def test_raw_response_list(self, client: Runloop) -> None:
7675
assert response.is_closed is True
7776
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
7877
run = response.parse()
79-
assert_matches_type(RunListResponse, run, path=["response"])
78+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
8079

8180
@parametrize
8281
def test_streaming_response_list(self, client: Runloop) -> None:
@@ -85,7 +84,7 @@ def test_streaming_response_list(self, client: Runloop) -> None:
8584
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
8685

8786
run = response.parse()
88-
assert_matches_type(RunListResponse, run, path=["response"])
87+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
8988

9089
assert cast(Any, response.is_closed) is True
9190

@@ -172,15 +171,15 @@ async def test_path_params_retrieve(self, async_client: AsyncRunloop) -> None:
172171
@parametrize
173172
async def test_method_list(self, async_client: AsyncRunloop) -> None:
174173
run = await async_client.benchmarks.runs.list()
175-
assert_matches_type(RunListResponse, run, path=["response"])
174+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
176175

177176
@parametrize
178177
async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> None:
179178
run = await async_client.benchmarks.runs.list(
180179
limit=0,
181180
starting_after="starting_after",
182181
)
183-
assert_matches_type(RunListResponse, run, path=["response"])
182+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
184183

185184
@parametrize
186185
async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
@@ -189,7 +188,7 @@ async def test_raw_response_list(self, async_client: AsyncRunloop) -> None:
189188
assert response.is_closed is True
190189
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
191190
run = await response.parse()
192-
assert_matches_type(RunListResponse, run, path=["response"])
191+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
193192

194193
@parametrize
195194
async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None:
@@ -198,7 +197,7 @@ async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None
198197
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
199198

200199
run = await response.parse()
201-
assert_matches_type(RunListResponse, run, path=["response"])
200+
assert_matches_type(BenchmarkRunListView, run, path=["response"])
202201

203202
assert cast(Any, response.is_closed) is True
204203

0 commit comments

Comments
 (0)