diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3e01e1e5..21fa4455a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.53.0" + ".": "0.54.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index de587de97..6f1758654 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 92 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8805efc665011161897e5c4c326dc44090ae55471a36bef8d63d17fec4e289f1.yml -openapi_spec_hash: 4d348158fc0b5daa3f55d831301859e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-20da49cddb76a81f77844447916c6d445b25634ff99aae15d8dfd50fe6d854e6.yml +openapi_spec_hash: 2097a1bfb48092ed3b03fa606f5c5447 config_hash: 60681f589a9e641fdb7f19af2021a033 diff --git a/CHANGELOG.md b/CHANGELOG.md index d734d1365..c8f36b1d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.54.0 (2025-08-05) + +Full Changelog: [v0.53.0...v0.54.0](https://github.com/runloopai/api-client-python/compare/v0.53.0...v0.54.0) + +### Features + +* **api:** api update ([9d40ca4](https://github.com/runloopai/api-client-python/commit/9d40ca48745596ae2fa29ea3ad7fba93961eb801)) +* **client:** support file upload requests ([5742a4b](https://github.com/runloopai/api-client-python/commit/5742a4ba701938607996b278531234121f81776d)) + ## 0.53.0 (2025-07-30) Full Changelog: [v0.52.0...v0.53.0](https://github.com/runloopai/api-client-python/compare/v0.52.0...v0.53.0) diff --git a/pyproject.toml b/pyproject.toml index 88d2dd96b..53783e85f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "0.53.0" +version = "0.54.0" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_base_client.py b/src/runloop_api_client/_base_client.py index d3b08b71d..4090e2164 100644 --- a/src/runloop_api_client/_base_client.py +++ b/src/runloop_api_client/_base_client.py @@ -532,7 +532,10 @@ def _build_request( is_body_allowed = options.method.lower() != "get" if is_body_allowed: - kwargs["json"] = json_data if is_given(json_data) else None + if isinstance(json_data, bytes): + kwargs["content"] = json_data + else: + kwargs["json"] = json_data if is_given(json_data) else None kwargs["files"] = files else: headers.pop("Content-Type", None) diff --git a/src/runloop_api_client/_files.py b/src/runloop_api_client/_files.py index 1b1825115..10f7978c8 100644 --- a/src/runloop_api_client/_files.py +++ b/src/runloop_api_client/_files.py @@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes: return file if is_tuple_t(file): - return (file[0], _read_file_content(file[1]), *file[2:]) + return (file[0], read_file_content(file[1]), *file[2:]) raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple") -def _read_file_content(file: FileContent) -> HttpxFileContent: +def read_file_content(file: FileContent) -> HttpxFileContent: if isinstance(file, os.PathLike): return pathlib.Path(file).read_bytes() return file @@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes: return file if is_tuple_t(file): - return (file[0], await _async_read_file_content(file[1]), *file[2:]) + return (file[0], await async_read_file_content(file[1]), *file[2:]) raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple") -async def _async_read_file_content(file: FileContent) -> HttpxFileContent: +async def async_read_file_content(file: FileContent) -> HttpxFileContent: if isinstance(file, os.PathLike): return await anyio.Path(file).read_bytes() diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index 70e50373d..a42e6aeee 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "0.53.0" # x-release-please-version +__version__ = "0.54.0" # x-release-please-version diff --git a/src/runloop_api_client/resources/benchmarks/benchmarks.py b/src/runloop_api_client/resources/benchmarks/benchmarks.py index 3df2b183d..c8b3ca1e7 100644 --- a/src/runloop_api_client/resources/benchmarks/benchmarks.py +++ b/src/runloop_api_client/resources/benchmarks/benchmarks.py @@ -71,7 +71,7 @@ def create( name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN, - required_secrets: List[str] | NotGiven = NOT_GIVEN, + required_secret_names: List[str] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, # 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. @@ -92,9 +92,9 @@ def create( required_environment_variables: Environment variables required to run the benchmark. If any required variables are not supplied, the benchmark will fail to start - required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to - benchmark required secret name). If any of these secrets are not provided or the - mapping is incorrect, the benchmark will fail to start. + required_secret_names: Secrets required to run the benchmark with (environment variable name will be + mapped to the your user secret by name). If any of these secrets are not + provided or the mapping is incorrect, the benchmark will fail to start. scenario_ids: The Scenario IDs that make up the Benchmark. @@ -115,7 +115,7 @@ def create( "name": name, "metadata": metadata, "required_environment_variables": required_environment_variables, - "required_secrets": required_secrets, + "required_secret_names": required_secret_names, "scenario_ids": scenario_ids, }, benchmark_create_params.BenchmarkCreateParams, @@ -170,7 +170,7 @@ def update( name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN, - required_secrets: List[str] | NotGiven = NOT_GIVEN, + required_secret_names: List[str] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, # 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. @@ -191,9 +191,9 @@ def update( required_environment_variables: Environment variables required to run the benchmark. If any required variables are not supplied, the benchmark will fail to start - required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to - benchmark required secret name). If any of these secrets are not provided or the - mapping is incorrect, the benchmark will fail to start. + required_secret_names: Secrets required to run the benchmark with (environment variable name will be + mapped to the your user secret by name). If any of these secrets are not + provided or the mapping is incorrect, the benchmark will fail to start. scenario_ids: The Scenario IDs that make up the Benchmark. @@ -216,7 +216,7 @@ def update( "name": name, "metadata": metadata, "required_environment_variables": required_environment_variables, - "required_secrets": required_secrets, + "required_secret_names": required_secret_names, "scenario_ids": scenario_ids, }, benchmark_update_params.BenchmarkUpdateParams, @@ -463,7 +463,7 @@ async def create( name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN, - required_secrets: List[str] | NotGiven = NOT_GIVEN, + required_secret_names: List[str] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, # 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. @@ -484,9 +484,9 @@ async def create( required_environment_variables: Environment variables required to run the benchmark. If any required variables are not supplied, the benchmark will fail to start - required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to - benchmark required secret name). If any of these secrets are not provided or the - mapping is incorrect, the benchmark will fail to start. + required_secret_names: Secrets required to run the benchmark with (environment variable name will be + mapped to the your user secret by name). If any of these secrets are not + provided or the mapping is incorrect, the benchmark will fail to start. scenario_ids: The Scenario IDs that make up the Benchmark. @@ -507,7 +507,7 @@ async def create( "name": name, "metadata": metadata, "required_environment_variables": required_environment_variables, - "required_secrets": required_secrets, + "required_secret_names": required_secret_names, "scenario_ids": scenario_ids, }, benchmark_create_params.BenchmarkCreateParams, @@ -562,7 +562,7 @@ async def update( name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN, - required_secrets: List[str] | NotGiven = NOT_GIVEN, + required_secret_names: List[str] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, # 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. @@ -583,9 +583,9 @@ async def update( required_environment_variables: Environment variables required to run the benchmark. If any required variables are not supplied, the benchmark will fail to start - required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to - benchmark required secret name). If any of these secrets are not provided or the - mapping is incorrect, the benchmark will fail to start. + required_secret_names: Secrets required to run the benchmark with (environment variable name will be + mapped to the your user secret by name). If any of these secrets are not + provided or the mapping is incorrect, the benchmark will fail to start. scenario_ids: The Scenario IDs that make up the Benchmark. @@ -608,7 +608,7 @@ async def update( "name": name, "metadata": metadata, "required_environment_variables": required_environment_variables, - "required_secrets": required_secrets, + "required_secret_names": required_secret_names, "scenario_ids": scenario_ids, }, benchmark_update_params.BenchmarkUpdateParams, diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 971bd5aca..e809c2204 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -1261,9 +1261,7 @@ def upload_file( id: str, *, path: str, - chmod: Optional[str] | NotGiven = NOT_GIVEN, file: FileTypes | NotGiven = NOT_GIVEN, - owner: Optional[str] | NotGiven = NOT_GIVEN, # 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, @@ -1282,12 +1280,6 @@ def upload_file( path: The path to write the file to on the Devbox. Path is relative to user home directory. - chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not - specified, default system permissions will be used. - - owner: File owner username. Optional. If not specified, the file will be owned by the - current user. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1305,9 +1297,7 @@ def upload_file( body = deepcopy_minimal( { "path": path, - "chmod": chmod, "file": file, - "owner": owner, } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) @@ -1335,8 +1325,6 @@ def write_file_contents( *, contents: str, file_path: str, - chmod: Optional[str] | NotGiven = NOT_GIVEN, - owner: Optional[str] | NotGiven = NOT_GIVEN, # 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, @@ -1356,12 +1344,6 @@ def write_file_contents( file_path: The path to write the file to on the Devbox. Path is relative to user home directory. - chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not - specified, default system permissions will be used. - - owner: File owner username. Optional. If not specified, the file will be owned by the - current user. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1382,8 +1364,6 @@ def write_file_contents( { "contents": contents, "file_path": file_path, - "chmod": chmod, - "owner": owner, }, devbox_write_file_contents_params.DevboxWriteFileContentsParams, ), @@ -2515,9 +2495,7 @@ async def upload_file( id: str, *, path: str, - chmod: Optional[str] | NotGiven = NOT_GIVEN, file: FileTypes | NotGiven = NOT_GIVEN, - owner: Optional[str] | NotGiven = NOT_GIVEN, # 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, @@ -2536,12 +2514,6 @@ async def upload_file( path: The path to write the file to on the Devbox. Path is relative to user home directory. - chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not - specified, default system permissions will be used. - - owner: File owner username. Optional. If not specified, the file will be owned by the - current user. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2559,9 +2531,7 @@ async def upload_file( body = deepcopy_minimal( { "path": path, - "chmod": chmod, "file": file, - "owner": owner, } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) @@ -2589,8 +2559,6 @@ async def write_file_contents( *, contents: str, file_path: str, - chmod: Optional[str] | NotGiven = NOT_GIVEN, - owner: Optional[str] | NotGiven = NOT_GIVEN, # 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, @@ -2610,12 +2578,6 @@ async def write_file_contents( file_path: The path to write the file to on the Devbox. Path is relative to user home directory. - chmod: File permissions in octal format (e.g., "644", "1755"). Optional. If not - specified, default system permissions will be used. - - owner: File owner username. Optional. If not specified, the file will be owned by the - current user. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -2636,8 +2598,6 @@ async def write_file_contents( { "contents": contents, "file_path": file_path, - "chmod": chmod, - "owner": owner, }, devbox_write_file_contents_params.DevboxWriteFileContentsParams, ), diff --git a/src/runloop_api_client/resources/scenarios/scenarios.py b/src/runloop_api_client/resources/scenarios/scenarios.py index 7425a11fb..7e041d594 100644 --- a/src/runloop_api_client/resources/scenarios/scenarios.py +++ b/src/runloop_api_client/resources/scenarios/scenarios.py @@ -204,7 +204,7 @@ def update( name: Optional[str] | NotGiven = NOT_GIVEN, reference_output: Optional[str] | NotGiven = NOT_GIVEN, required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN, - required_secrets: Optional[List[str]] | NotGiven = NOT_GIVEN, + required_secret_names: Optional[List[str]] | NotGiven = NOT_GIVEN, scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN, # 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. @@ -234,7 +234,7 @@ def update( required_environment_variables: Environment variables required to run the scenario. - required_secrets: Secrets required to run the scenario. + required_secret_names: Secrets required to run the scenario. scoring_contract: The scoring contract for the Scenario. @@ -260,7 +260,7 @@ def update( "name": name, "reference_output": reference_output, "required_environment_variables": required_environment_variables, - "required_secrets": required_secrets, + "required_secret_names": required_secret_names, "scoring_contract": scoring_contract, }, scenario_update_params.ScenarioUpdateParams, @@ -650,7 +650,7 @@ async def update( name: Optional[str] | NotGiven = NOT_GIVEN, reference_output: Optional[str] | NotGiven = NOT_GIVEN, required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN, - required_secrets: Optional[List[str]] | NotGiven = NOT_GIVEN, + required_secret_names: Optional[List[str]] | NotGiven = NOT_GIVEN, scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN, # 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. @@ -680,7 +680,7 @@ async def update( required_environment_variables: Environment variables required to run the scenario. - required_secrets: Secrets required to run the scenario. + required_secret_names: Secrets required to run the scenario. scoring_contract: The scoring contract for the Scenario. @@ -706,7 +706,7 @@ async def update( "name": name, "reference_output": reference_output, "required_environment_variables": required_environment_variables, - "required_secrets": required_secrets, + "required_secret_names": required_secret_names, "scoring_contract": scoring_contract, }, scenario_update_params.ScenarioUpdateParams, diff --git a/src/runloop_api_client/types/benchmark_create_params.py b/src/runloop_api_client/types/benchmark_create_params.py index 2025bc52c..11937ef53 100644 --- a/src/runloop_api_client/types/benchmark_create_params.py +++ b/src/runloop_api_client/types/benchmark_create_params.py @@ -21,11 +21,11 @@ class BenchmarkCreateParams(TypedDict, total=False): If any required variables are not supplied, the benchmark will fail to start """ - required_secrets: List[str] + required_secret_names: List[str] """ - Secrets required to run the benchmark with (user secret name will be mapped to - benchmark required secret name). If any of these secrets are not provided or the - mapping is incorrect, the benchmark will fail to start. + Secrets required to run the benchmark with (environment variable name will be + mapped to the your user secret by name). If any of these secrets are not + provided or the mapping is incorrect, the benchmark will fail to start. """ scenario_ids: Optional[List[str]] diff --git a/src/runloop_api_client/types/benchmark_run_view.py b/src/runloop_api_client/types/benchmark_run_view.py index 140122ecd..00dd98fc2 100644 --- a/src/runloop_api_client/types/benchmark_run_view.py +++ b/src/runloop_api_client/types/benchmark_run_view.py @@ -43,4 +43,9 @@ class BenchmarkRunView(BaseModel): """ secrets_provided: Optional[Dict[str, str]] = None - """User secrets used to run the benchmark.""" + """User secrets used to run the benchmark. + + Example: {"DB_PASS": "DATABASE_PASSWORD"} would set the environment variable + 'DB_PASS' on all scenario devboxes to the value of the secret + 'DATABASE_PASSWORD'. + """ diff --git a/src/runloop_api_client/types/benchmark_start_run_params.py b/src/runloop_api_client/types/benchmark_start_run_params.py index caa2e1927..23f211cae 100644 --- a/src/runloop_api_client/types/benchmark_start_run_params.py +++ b/src/runloop_api_client/types/benchmark_start_run_params.py @@ -26,10 +26,19 @@ class BenchmarkStartRunParams(TypedDict, total=False): class RunProfile(TypedDict, total=False): env_vars: Annotated[Optional[Dict[str, str]], PropertyInfo(alias="envVars")] - """Environment Variables: Environment Variable to Value.""" + """Mapping of Environment Variable to Value. + + May be shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would + set the environment variable 'DB_PASS' to the value 'DATABASE_PASSWORD_VALUE'. + """ purpose: Optional[str] """Purpose of the run.""" secrets: Optional[Dict[str, str]] - """Secrets: Environment Variable to User Secret Name.""" + """Mapping of Environment Variable to User Secret Name. + + Never shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would + set the environment variable 'DB_PASS' to the value of the secret + 'DATABASE_PASSWORD'. + """ diff --git a/src/runloop_api_client/types/benchmark_update_params.py b/src/runloop_api_client/types/benchmark_update_params.py index d3b2a1276..009dd5793 100644 --- a/src/runloop_api_client/types/benchmark_update_params.py +++ b/src/runloop_api_client/types/benchmark_update_params.py @@ -21,11 +21,11 @@ class BenchmarkUpdateParams(TypedDict, total=False): If any required variables are not supplied, the benchmark will fail to start """ - required_secrets: List[str] + required_secret_names: List[str] """ - Secrets required to run the benchmark with (user secret name will be mapped to - benchmark required secret name). If any of these secrets are not provided or the - mapping is incorrect, the benchmark will fail to start. + Secrets required to run the benchmark with (environment variable name will be + mapped to the your user secret by name). If any of these secrets are not + provided or the mapping is incorrect, the benchmark will fail to start. """ scenario_ids: Optional[List[str]] diff --git a/src/runloop_api_client/types/devbox_upload_file_params.py b/src/runloop_api_client/types/devbox_upload_file_params.py index edcad111d..9e83fa318 100644 --- a/src/runloop_api_client/types/devbox_upload_file_params.py +++ b/src/runloop_api_client/types/devbox_upload_file_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Optional from typing_extensions import Required, TypedDict from .._types import FileTypes @@ -17,16 +16,4 @@ class DevboxUploadFileParams(TypedDict, total=False): Path is relative to user home directory. """ - chmod: Optional[str] - """File permissions in octal format (e.g., "644", "1755"). - - Optional. If not specified, default system permissions will be used. - """ - file: FileTypes - - owner: Optional[str] - """File owner username. - - Optional. If not specified, the file will be owned by the current user. - """ diff --git a/src/runloop_api_client/types/devbox_write_file_contents_params.py b/src/runloop_api_client/types/devbox_write_file_contents_params.py index 549125912..f47a73839 100644 --- a/src/runloop_api_client/types/devbox_write_file_contents_params.py +++ b/src/runloop_api_client/types/devbox_write_file_contents_params.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Optional from typing_extensions import Required, TypedDict __all__ = ["DevboxWriteFileContentsParams"] @@ -17,15 +16,3 @@ class DevboxWriteFileContentsParams(TypedDict, total=False): Path is relative to user home directory. """ - - chmod: Optional[str] - """File permissions in octal format (e.g., "644", "1755"). - - Optional. If not specified, default system permissions will be used. - """ - - owner: Optional[str] - """File owner username. - - Optional. If not specified, the file will be owned by the current user. - """ diff --git a/src/runloop_api_client/types/repository_manifest_view.py b/src/runloop_api_client/types/repository_manifest_view.py index 334910a99..dbae3e986 100644 --- a/src/runloop_api_client/types/repository_manifest_view.py +++ b/src/runloop_api_client/types/repository_manifest_view.py @@ -7,6 +7,7 @@ __all__ = [ "RepositoryManifestView", "ContainerConfig", + "Language", "Workspace", "WorkspaceDevCommands", "ContainerizedService", @@ -29,6 +30,12 @@ class ContainerConfig(BaseModel): """ +class Language(BaseModel): + language: Optional[str] = None + + version: Optional[str] = None + + class WorkspaceDevCommands(BaseModel): build: Optional[List[str]] = None """Build command (e.g. npm run build).""" @@ -122,6 +129,12 @@ class RepositoryManifestView(BaseModel): container_config: ContainerConfig """Container configuration specifying the base image and setup commands.""" + languages: List[Language] + """List of required languages found in Repository.""" + + workflows: List[str] + """The workflow(s) that were selected to build the manifest for this repo.""" + workspaces: List[Workspace] """List of workspaces within the repository. diff --git a/src/runloop_api_client/types/scenario_start_run_params.py b/src/runloop_api_client/types/scenario_start_run_params.py index ea3871193..91d7e34e8 100644 --- a/src/runloop_api_client/types/scenario_start_run_params.py +++ b/src/runloop_api_client/types/scenario_start_run_params.py @@ -29,10 +29,19 @@ class ScenarioStartRunParams(TypedDict, total=False): class RunProfile(TypedDict, total=False): env_vars: Annotated[Optional[Dict[str, str]], PropertyInfo(alias="envVars")] - """Environment Variables: Environment Variable to Value.""" + """Mapping of Environment Variable to Value. + + May be shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would + set the environment variable 'DB_PASS' to the value 'DATABASE_PASSWORD_VALUE'. + """ purpose: Optional[str] """Purpose of the run.""" secrets: Optional[Dict[str, str]] - """Secrets: Environment Variable to User Secret Name.""" + """Mapping of Environment Variable to User Secret Name. + + Never shown in devbox logging. Example: {"DB_PASS": "DATABASE_PASSWORD"} would + set the environment variable 'DB_PASS' to the value of the secret + 'DATABASE_PASSWORD'. + """ diff --git a/src/runloop_api_client/types/scenario_update_params.py b/src/runloop_api_client/types/scenario_update_params.py index 81608552d..6605c9f24 100644 --- a/src/runloop_api_client/types/scenario_update_params.py +++ b/src/runloop_api_client/types/scenario_update_params.py @@ -35,7 +35,7 @@ class ScenarioUpdateParams(TypedDict, total=False): required_environment_variables: Optional[List[str]] """Environment variables required to run the scenario.""" - required_secrets: Optional[List[str]] + required_secret_names: Optional[List[str]] """Secrets required to run the scenario.""" scoring_contract: Optional[ScoringContractUpdateParam] diff --git a/src/runloop_api_client/types/scoring_function_param.py b/src/runloop_api_client/types/scoring_function_param.py index 1dedcc557..e2c9bc253 100644 --- a/src/runloop_api_client/types/scoring_function_param.py +++ b/src/runloop_api_client/types/scoring_function_param.py @@ -76,7 +76,7 @@ class ScorerPythonScriptScoringFunction(TypedDict, total=False): python_version_constraint: Optional[str] """Python version to run scoring. Default is "==3.12.10" """ - requirements_contents: str + requirements_contents: Optional[str] """Package dependencies to be installed. The requirements should be a valid requirements.txt file. diff --git a/tests/api_resources/test_benchmarks.py b/tests/api_resources/test_benchmarks.py index bf4e4921c..00afa4d43 100644 --- a/tests/api_resources/test_benchmarks.py +++ b/tests/api_resources/test_benchmarks.py @@ -35,7 +35,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: name="name", metadata={"foo": "string"}, required_environment_variables=["string"], - required_secrets=["string"], + required_secret_names=["string"], scenario_ids=["string"], ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -117,7 +117,7 @@ def test_method_update_with_all_params(self, client: Runloop) -> None: name="name", metadata={"foo": "string"}, required_environment_variables=["string"], - required_secrets=["string"], + required_secret_names=["string"], scenario_ids=["string"], ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -333,7 +333,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - name="name", metadata={"foo": "string"}, required_environment_variables=["string"], - required_secrets=["string"], + required_secret_names=["string"], scenario_ids=["string"], ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -415,7 +415,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) - name="name", metadata={"foo": "string"}, required_environment_variables=["string"], - required_secrets=["string"], + required_secret_names=["string"], scenario_ids=["string"], ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index c83eb021a..af4645420 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -887,9 +887,7 @@ def test_method_upload_file_with_all_params(self, client: Runloop) -> None: devbox = client.devboxes.upload_file( id="id", path="path", - chmod="chmod", file=b"raw file contents", - owner="owner", ) assert_matches_type(object, devbox, path=["response"]) @@ -936,17 +934,6 @@ def test_method_write_file_contents(self, client: Runloop) -> None: ) assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"]) - @parametrize - def test_method_write_file_contents_with_all_params(self, client: Runloop) -> None: - devbox = client.devboxes.write_file_contents( - id="id", - contents="contents", - file_path="file_path", - chmod="chmod", - owner="owner", - ) - assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"]) - @parametrize def test_raw_response_write_file_contents(self, client: Runloop) -> None: response = client.devboxes.with_raw_response.write_file_contents( @@ -2131,9 +2118,7 @@ async def test_method_upload_file_with_all_params(self, async_client: AsyncRunlo devbox = await async_client.devboxes.upload_file( id="id", path="path", - chmod="chmod", file=b"raw file contents", - owner="owner", ) assert_matches_type(object, devbox, path=["response"]) @@ -2180,17 +2165,6 @@ async def test_method_write_file_contents(self, async_client: AsyncRunloop) -> N ) assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"]) - @parametrize - async def test_method_write_file_contents_with_all_params(self, async_client: AsyncRunloop) -> None: - devbox = await async_client.devboxes.write_file_contents( - id="id", - contents="contents", - file_path="file_path", - chmod="chmod", - owner="owner", - ) - assert_matches_type(DevboxExecutionDetailView, devbox, path=["response"]) - @parametrize async def test_raw_response_write_file_contents(self, async_client: AsyncRunloop) -> None: response = await async_client.devboxes.with_raw_response.write_file_contents( diff --git a/tests/api_resources/test_scenarios.py b/tests/api_resources/test_scenarios.py index 69c75072f..53507ac7f 100644 --- a/tests/api_resources/test_scenarios.py +++ b/tests/api_resources/test_scenarios.py @@ -230,7 +230,7 @@ def test_method_update_with_all_params(self, client: Runloop) -> None: name="name", reference_output="reference_output", required_environment_variables=["string"], - required_secrets=["string"], + required_secret_names=["string"], scoring_contract={ "scoring_function_parameters": [ { @@ -609,7 +609,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) - name="name", reference_output="reference_output", required_environment_variables=["string"], - required_secrets=["string"], + required_secret_names=["string"], scoring_contract={ "scoring_function_parameters": [ {