Skip to content

Commit 702b828

Browse files
authored
Merge pull request #562 from runloopai/gautam-score-metadata
feat: Add metadata to start_run_and_await_ready
2 parents b0827da + a6c381d commit 702b828

File tree

4 files changed

+303
-4
lines changed

4 files changed

+303
-4
lines changed

src/runloop_api_client/resources/blueprints.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
async_to_raw_response_wrapper,
2121
async_to_streamed_response_wrapper,
2222
)
23+
from ..pagination import SyncBlueprintsCursorIDPage, AsyncBlueprintsCursorIDPage
2324
from .._exceptions import RunloopError
2425
from ..lib.polling import PollingConfig, poll_until
25-
from ..lib.polling_async import async_poll_until
26-
from ..pagination import SyncBlueprintsCursorIDPage, AsyncBlueprintsCursorIDPage
2726
from .._base_client import AsyncPaginator, make_request_options
27+
from ..lib.polling_async import async_poll_until
2828
from ..types.blueprint_view import BlueprintView
2929
from ..types.blueprint_preview_view import BlueprintPreviewView
3030
from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
)
9494
from ..._exceptions import RunloopError
9595
from ...lib.polling import PollingConfig, poll_until
96-
from ...lib.polling_async import async_poll_until
9796
from ..._base_client import AsyncPaginator, make_request_options
9897
from .disk_snapshots import (
9998
DiskSnapshotsResource,
@@ -103,6 +102,7 @@
103102
DiskSnapshotsResourceWithStreamingResponse,
104103
AsyncDiskSnapshotsResourceWithStreamingResponse,
105104
)
105+
from ...lib.polling_async import async_poll_until
106106
from ...types.devbox_view import DevboxView
107107
from ...types.devbox_tunnel_view import DevboxTunnelView
108108
from ...types.devbox_snapshot_view import DevboxSnapshotView

src/runloop_api_client/resources/scenarios/scenarios.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
maybe_transform,
3535
async_maybe_transform,
3636
)
37-
from ...lib.polling import PollingConfig
3837
from ..._compat import cached_property
3938
from ..._resource import SyncAPIResource, AsyncAPIResource
4039
from ..._response import (
@@ -44,6 +43,7 @@
4443
async_to_streamed_response_wrapper,
4544
)
4645
from ...pagination import SyncScenariosCursorIDPage, AsyncScenariosCursorIDPage
46+
from ...lib.polling import PollingConfig
4747
from ..._base_client import AsyncPaginator, make_request_options
4848
from ...types.scenario_view import ScenarioView
4949
from ...types.scenario_run_view import ScenarioRunView
@@ -422,6 +422,7 @@ def start_run_and_await_env_ready(
422422
*,
423423
scenario_id: str,
424424
benchmark_run_id: Optional[str] | NotGiven = NOT_GIVEN,
425+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
425426
run_name: Optional[str] | NotGiven = NOT_GIVEN,
426427
polling_config: PollingConfig | None = None,
427428
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -455,6 +456,7 @@ def start_run_and_await_env_ready(
455456
run = self.start_run(
456457
scenario_id=scenario_id,
457458
benchmark_run_id=benchmark_run_id,
459+
metadata=metadata,
458460
run_name=run_name,
459461
extra_headers=extra_headers,
460462
extra_query=extra_query,
@@ -842,6 +844,7 @@ async def start_run_and_await_env_ready(
842844
self,
843845
scenario_id: str,
844846
benchmark_run_id: Optional[str] | NotGiven = NOT_GIVEN,
847+
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
845848
run_name: Optional[str] | NotGiven = NOT_GIVEN,
846849
polling_config: PollingConfig | None = None,
847850
) -> ScenarioRunView:
@@ -863,6 +866,7 @@ async def start_run_and_await_env_ready(
863866
run = await self.start_run(
864867
scenario_id=scenario_id,
865868
benchmark_run_id=benchmark_run_id,
869+
metadata=metadata,
866870
run_name=run_name,
867871
)
868872

0 commit comments

Comments
 (0)