Skip to content

Commit 9d40ca4

Browse files
feat(api): api update
1 parent 5742a4b commit 9d40ca4

17 files changed

+85
-141
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 92
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8805efc665011161897e5c4c326dc44090ae55471a36bef8d63d17fec4e289f1.yml
3-
openapi_spec_hash: 4d348158fc0b5daa3f55d831301859e4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-20da49cddb76a81f77844447916c6d445b25634ff99aae15d8dfd50fe6d854e6.yml
3+
openapi_spec_hash: 2097a1bfb48092ed3b03fa606f5c5447
44
config_hash: 60681f589a9e641fdb7f19af2021a033

src/runloop_api_client/resources/benchmarks/benchmarks.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def create(
7171
name: str,
7272
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
7373
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
74-
required_secrets: List[str] | NotGiven = NOT_GIVEN,
74+
required_secret_names: List[str] | NotGiven = NOT_GIVEN,
7575
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
7676
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7777
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -92,9 +92,9 @@ def create(
9292
required_environment_variables: Environment variables required to run the benchmark. If any required variables
9393
are not supplied, the benchmark will fail to start
9494
95-
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
96-
benchmark required secret name). If any of these secrets are not provided or the
97-
mapping is incorrect, the benchmark will fail to start.
95+
required_secret_names: Secrets required to run the benchmark with (environment variable name will be
96+
mapped to the your user secret by name). If any of these secrets are not
97+
provided or the mapping is incorrect, the benchmark will fail to start.
9898
9999
scenario_ids: The Scenario IDs that make up the Benchmark.
100100
@@ -115,7 +115,7 @@ def create(
115115
"name": name,
116116
"metadata": metadata,
117117
"required_environment_variables": required_environment_variables,
118-
"required_secrets": required_secrets,
118+
"required_secret_names": required_secret_names,
119119
"scenario_ids": scenario_ids,
120120
},
121121
benchmark_create_params.BenchmarkCreateParams,
@@ -170,7 +170,7 @@ def update(
170170
name: str,
171171
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
172172
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
173-
required_secrets: List[str] | NotGiven = NOT_GIVEN,
173+
required_secret_names: List[str] | NotGiven = NOT_GIVEN,
174174
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
175175
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
176176
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -191,9 +191,9 @@ def update(
191191
required_environment_variables: Environment variables required to run the benchmark. If any required variables
192192
are not supplied, the benchmark will fail to start
193193
194-
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
195-
benchmark required secret name). If any of these secrets are not provided or the
196-
mapping is incorrect, the benchmark will fail to start.
194+
required_secret_names: Secrets required to run the benchmark with (environment variable name will be
195+
mapped to the your user secret by name). If any of these secrets are not
196+
provided or the mapping is incorrect, the benchmark will fail to start.
197197
198198
scenario_ids: The Scenario IDs that make up the Benchmark.
199199
@@ -216,7 +216,7 @@ def update(
216216
"name": name,
217217
"metadata": metadata,
218218
"required_environment_variables": required_environment_variables,
219-
"required_secrets": required_secrets,
219+
"required_secret_names": required_secret_names,
220220
"scenario_ids": scenario_ids,
221221
},
222222
benchmark_update_params.BenchmarkUpdateParams,
@@ -463,7 +463,7 @@ async def create(
463463
name: str,
464464
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
465465
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
466-
required_secrets: List[str] | NotGiven = NOT_GIVEN,
466+
required_secret_names: List[str] | NotGiven = NOT_GIVEN,
467467
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
468468
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
469469
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -484,9 +484,9 @@ async def create(
484484
required_environment_variables: Environment variables required to run the benchmark. If any required variables
485485
are not supplied, the benchmark will fail to start
486486
487-
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
488-
benchmark required secret name). If any of these secrets are not provided or the
489-
mapping is incorrect, the benchmark will fail to start.
487+
required_secret_names: Secrets required to run the benchmark with (environment variable name will be
488+
mapped to the your user secret by name). If any of these secrets are not
489+
provided or the mapping is incorrect, the benchmark will fail to start.
490490
491491
scenario_ids: The Scenario IDs that make up the Benchmark.
492492
@@ -507,7 +507,7 @@ async def create(
507507
"name": name,
508508
"metadata": metadata,
509509
"required_environment_variables": required_environment_variables,
510-
"required_secrets": required_secrets,
510+
"required_secret_names": required_secret_names,
511511
"scenario_ids": scenario_ids,
512512
},
513513
benchmark_create_params.BenchmarkCreateParams,
@@ -562,7 +562,7 @@ async def update(
562562
name: str,
563563
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
564564
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
565-
required_secrets: List[str] | NotGiven = NOT_GIVEN,
565+
required_secret_names: List[str] | NotGiven = NOT_GIVEN,
566566
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
567567
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
568568
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -583,9 +583,9 @@ async def update(
583583
required_environment_variables: Environment variables required to run the benchmark. If any required variables
584584
are not supplied, the benchmark will fail to start
585585
586-
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
587-
benchmark required secret name). If any of these secrets are not provided or the
588-
mapping is incorrect, the benchmark will fail to start.
586+
required_secret_names: Secrets required to run the benchmark with (environment variable name will be
587+
mapped to the your user secret by name). If any of these secrets are not
588+
provided or the mapping is incorrect, the benchmark will fail to start.
589589
590590
scenario_ids: The Scenario IDs that make up the Benchmark.
591591
@@ -608,7 +608,7 @@ async def update(
608608
"name": name,
609609
"metadata": metadata,
610610
"required_environment_variables": required_environment_variables,
611-
"required_secrets": required_secrets,
611+
"required_secret_names": required_secret_names,
612612
"scenario_ids": scenario_ids,
613613
},
614614
benchmark_update_params.BenchmarkUpdateParams,

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,9 +1261,7 @@ def upload_file(
12611261
id: str,
12621262
*,
12631263
path: str,
1264-
chmod: Optional[str] | NotGiven = NOT_GIVEN,
12651264
file: FileTypes | NotGiven = NOT_GIVEN,
1266-
owner: Optional[str] | NotGiven = NOT_GIVEN,
12671265
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
12681266
# The extra values given here take precedence over values defined on the client or passed to this method.
12691267
extra_headers: Headers | None = None,
@@ -1282,12 +1280,6 @@ def upload_file(
12821280
path: The path to write the file to on the Devbox. Path is relative to user home
12831281
directory.
12841282
1285-
chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not
1286-
specified, default system permissions will be used.
1287-
1288-
owner: File owner username. Optional. If not specified, the file will be owned by the
1289-
current user.
1290-
12911283
extra_headers: Send extra headers
12921284
12931285
extra_query: Add additional query parameters to the request
@@ -1305,9 +1297,7 @@ def upload_file(
13051297
body = deepcopy_minimal(
13061298
{
13071299
"path": path,
1308-
"chmod": chmod,
13091300
"file": file,
1310-
"owner": owner,
13111301
}
13121302
)
13131303
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
@@ -1335,8 +1325,6 @@ def write_file_contents(
13351325
*,
13361326
contents: str,
13371327
file_path: str,
1338-
chmod: Optional[str] | NotGiven = NOT_GIVEN,
1339-
owner: Optional[str] | NotGiven = NOT_GIVEN,
13401328
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
13411329
# The extra values given here take precedence over values defined on the client or passed to this method.
13421330
extra_headers: Headers | None = None,
@@ -1356,12 +1344,6 @@ def write_file_contents(
13561344
file_path: The path to write the file to on the Devbox. Path is relative to user home
13571345
directory.
13581346
1359-
chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not
1360-
specified, default system permissions will be used.
1361-
1362-
owner: File owner username. Optional. If not specified, the file will be owned by the
1363-
current user.
1364-
13651347
extra_headers: Send extra headers
13661348
13671349
extra_query: Add additional query parameters to the request
@@ -1382,8 +1364,6 @@ def write_file_contents(
13821364
{
13831365
"contents": contents,
13841366
"file_path": file_path,
1385-
"chmod": chmod,
1386-
"owner": owner,
13871367
},
13881368
devbox_write_file_contents_params.DevboxWriteFileContentsParams,
13891369
),
@@ -2515,9 +2495,7 @@ async def upload_file(
25152495
id: str,
25162496
*,
25172497
path: str,
2518-
chmod: Optional[str] | NotGiven = NOT_GIVEN,
25192498
file: FileTypes | NotGiven = NOT_GIVEN,
2520-
owner: Optional[str] | NotGiven = NOT_GIVEN,
25212499
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
25222500
# The extra values given here take precedence over values defined on the client or passed to this method.
25232501
extra_headers: Headers | None = None,
@@ -2536,12 +2514,6 @@ async def upload_file(
25362514
path: The path to write the file to on the Devbox. Path is relative to user home
25372515
directory.
25382516
2539-
chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not
2540-
specified, default system permissions will be used.
2541-
2542-
owner: File owner username. Optional. If not specified, the file will be owned by the
2543-
current user.
2544-
25452517
extra_headers: Send extra headers
25462518
25472519
extra_query: Add additional query parameters to the request
@@ -2559,9 +2531,7 @@ async def upload_file(
25592531
body = deepcopy_minimal(
25602532
{
25612533
"path": path,
2562-
"chmod": chmod,
25632534
"file": file,
2564-
"owner": owner,
25652535
}
25662536
)
25672537
files = extract_files(cast(Mapping[str, object], body), paths=[["file"]])
@@ -2589,8 +2559,6 @@ async def write_file_contents(
25892559
*,
25902560
contents: str,
25912561
file_path: str,
2592-
chmod: Optional[str] | NotGiven = NOT_GIVEN,
2593-
owner: Optional[str] | NotGiven = NOT_GIVEN,
25942562
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
25952563
# The extra values given here take precedence over values defined on the client or passed to this method.
25962564
extra_headers: Headers | None = None,
@@ -2610,12 +2578,6 @@ async def write_file_contents(
26102578
file_path: The path to write the file to on the Devbox. Path is relative to user home
26112579
directory.
26122580
2613-
chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not
2614-
specified, default system permissions will be used.
2615-
2616-
owner: File owner username. Optional. If not specified, the file will be owned by the
2617-
current user.
2618-
26192581
extra_headers: Send extra headers
26202582
26212583
extra_query: Add additional query parameters to the request
@@ -2636,8 +2598,6 @@ async def write_file_contents(
26362598
{
26372599
"contents": contents,
26382600
"file_path": file_path,
2639-
"chmod": chmod,
2640-
"owner": owner,
26412601
},
26422602
devbox_write_file_contents_params.DevboxWriteFileContentsParams,
26432603
),

src/runloop_api_client/resources/scenarios/scenarios.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def update(
204204
name: Optional[str] | NotGiven = NOT_GIVEN,
205205
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
206206
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
207-
required_secrets: Optional[List[str]] | NotGiven = NOT_GIVEN,
207+
required_secret_names: Optional[List[str]] | NotGiven = NOT_GIVEN,
208208
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
209209
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
210210
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -234,7 +234,7 @@ def update(
234234
235235
required_environment_variables: Environment variables required to run the scenario.
236236
237-
required_secrets: Secrets required to run the scenario.
237+
required_secret_names: Secrets required to run the scenario.
238238
239239
scoring_contract: The scoring contract for the Scenario.
240240
@@ -260,7 +260,7 @@ def update(
260260
"name": name,
261261
"reference_output": reference_output,
262262
"required_environment_variables": required_environment_variables,
263-
"required_secrets": required_secrets,
263+
"required_secret_names": required_secret_names,
264264
"scoring_contract": scoring_contract,
265265
},
266266
scenario_update_params.ScenarioUpdateParams,
@@ -650,7 +650,7 @@ async def update(
650650
name: Optional[str] | NotGiven = NOT_GIVEN,
651651
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
652652
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
653-
required_secrets: Optional[List[str]] | NotGiven = NOT_GIVEN,
653+
required_secret_names: Optional[List[str]] | NotGiven = NOT_GIVEN,
654654
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
655655
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
656656
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -680,7 +680,7 @@ async def update(
680680
681681
required_environment_variables: Environment variables required to run the scenario.
682682
683-
required_secrets: Secrets required to run the scenario.
683+
required_secret_names: Secrets required to run the scenario.
684684
685685
scoring_contract: The scoring contract for the Scenario.
686686
@@ -706,7 +706,7 @@ async def update(
706706
"name": name,
707707
"reference_output": reference_output,
708708
"required_environment_variables": required_environment_variables,
709-
"required_secrets": required_secrets,
709+
"required_secret_names": required_secret_names,
710710
"scoring_contract": scoring_contract,
711711
},
712712
scenario_update_params.ScenarioUpdateParams,

src/runloop_api_client/types/benchmark_create_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class BenchmarkCreateParams(TypedDict, total=False):
2121
If any required variables are not supplied, the benchmark will fail to start
2222
"""
2323

24-
required_secrets: List[str]
24+
required_secret_names: List[str]
2525
"""
26-
Secrets required to run the benchmark with (user secret name will be mapped to
27-
benchmark required secret name). If any of these secrets are not provided or the
28-
mapping is incorrect, the benchmark will fail to start.
26+
Secrets required to run the benchmark with (environment variable name will be
27+
mapped to the your user secret by name). If any of these secrets are not
28+
provided or the mapping is incorrect, the benchmark will fail to start.
2929
"""
3030

3131
scenario_ids: Optional[List[str]]

src/runloop_api_client/types/benchmark_run_view.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ class BenchmarkRunView(BaseModel):
4343
"""
4444

4545
secrets_provided: Optional[Dict[str, str]] = None
46-
"""User secrets used to run the benchmark."""
46+
"""User secrets used to run the benchmark.
47+
48+
Example: {"DB_PASS": "DATABASE_PASSWORD"} would set the environment variable
49+
'DB_PASS' on all scenario devboxes to the value of the secret
50+
'DATABASE_PASSWORD'.
51+
"""

src/runloop_api_client/types/benchmark_start_run_params.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,19 @@ class BenchmarkStartRunParams(TypedDict, total=False):
2626

2727
class RunProfile(TypedDict, total=False):
2828
env_vars: Annotated[Optional[Dict[str, str]], PropertyInfo(alias="envVars")]
29-
"""Environment Variables: Environment Variable to Value."""
29+
"""Mapping of Environment Variable to Value.
30+
31+
May be shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would
32+
set the environment variable 'DB_PASS' to the value 'DATABASE_PASSWORD_VALUE'.
33+
"""
3034

3135
purpose: Optional[str]
3236
"""Purpose of the run."""
3337

3438
secrets: Optional[Dict[str, str]]
35-
"""Secrets: Environment Variable to User Secret Name."""
39+
"""Mapping of Environment Variable to User Secret Name.
40+
41+
Never shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would
42+
set the environment variable 'DB_PASS' to the value of the secret
43+
'DATABASE_PASSWORD'.
44+
"""

src/runloop_api_client/types/benchmark_update_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ class BenchmarkUpdateParams(TypedDict, total=False):
2121
If any required variables are not supplied, the benchmark will fail to start
2222
"""
2323

24-
required_secrets: List[str]
24+
required_secret_names: List[str]
2525
"""
26-
Secrets required to run the benchmark with (user secret name will be mapped to
27-
benchmark required secret name). If any of these secrets are not provided or the
28-
mapping is incorrect, the benchmark will fail to start.
26+
Secrets required to run the benchmark with (environment variable name will be
27+
mapped to the your user secret by name). If any of these secrets are not
28+
provided or the mapping is incorrect, the benchmark will fail to start.
2929
"""
3030

3131
scenario_ids: Optional[List[str]]

0 commit comments

Comments
 (0)