diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1b5dc400b..0a40b9d77 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.39.0" + ".": "0.40.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index aacf02853..4abf1099f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 87 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-4cd38d2f4180cc9bd949f182a221d6221c44e7e0ec1ddc110dd7677ba822b51a.yml -openapi_spec_hash: e186fd7fd5f09ba496f0b7bb87365f3b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-c23f8f8426208651ecf7b2a4108ea2003c6e3241c6928e88ef004f76fe826c08.yml +openapi_spec_hash: 2eee5118b3c2dd49f9124df0d10341ed config_hash: 4514558503b7aa6eba8c2941564c247d diff --git a/CHANGELOG.md b/CHANGELOG.md index 7542cc0e3..10650f7c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.40.0 (2025-06-10) + +Full Changelog: [v0.39.0...v0.40.0](https://github.com/runloopai/api-client-python/compare/v0.39.0...v0.40.0) + +### Features + +* **api:** api update ([8e066c3](https://github.com/runloopai/api-client-python/commit/8e066c3dde50f92a16054323b867f94bc6ba0f8e)) +* **api:** api update ([4a9a9e3](https://github.com/runloopai/api-client-python/commit/4a9a9e3c2d5b307df4205f16cc8a6eca38f51721)) + ## 0.39.0 (2025-06-04) Full Changelog: [v0.38.0...v0.39.0](https://github.com/runloopai/api-client-python/compare/v0.38.0...v0.39.0) diff --git a/api.md b/api.md index c8fd0e94e..ce2831ca0 100644 --- a/api.md +++ b/api.md @@ -339,4 +339,4 @@ Methods: - client.repositories.list(\*\*params) -> SyncRepositoriesCursorIDPage[RepositoryConnectionView] - client.repositories.delete(id) -> object - client.repositories.list_inspections(id) -> RepositoryInspectionListView -- client.repositories.refresh(id) -> object +- client.repositories.refresh(id, \*\*params) -> object diff --git a/pyproject.toml b/pyproject.toml index 2a900f11a..e3cc18f2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "0.39.0" +version = "0.40.0" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index b6c29df97..30ecb38ba 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.39.0" # x-release-please-version +__version__ = "0.40.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 65381f93d..d4270d242 100644 --- a/src/runloop_api_client/resources/benchmarks/benchmarks.py +++ b/src/runloop_api_client/resources/benchmarks/benchmarks.py @@ -68,7 +68,6 @@ def with_streaming_response(self) -> BenchmarksResourceWithStreamingResponse: def create( self, *, - is_public: bool, name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, @@ -84,8 +83,6 @@ def create( Create a Benchmark with a set of Scenarios. Args: - is_public: Whether this benchmark is public. - name: The name of the Benchmark. This must be unique. metadata: User defined metadata to attach to the benchmark for organization. @@ -106,7 +103,6 @@ def create( "/v1/benchmarks", body=maybe_transform( { - "is_public": is_public, "name": name, "metadata": metadata, "scenario_ids": scenario_ids, @@ -160,7 +156,6 @@ def update( self, id: str, *, - is_public: bool, name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, @@ -176,8 +171,6 @@ def update( Update a Benchmark with a set of Scenarios. Args: - is_public: Whether this benchmark is public. - name: The name of the Benchmark. This must be unique. metadata: User defined metadata to attach to the benchmark for organization. @@ -200,7 +193,6 @@ def update( f"/v1/benchmarks/{id}", body=maybe_transform( { - "is_public": is_public, "name": name, "metadata": metadata, "scenario_ids": scenario_ids, @@ -442,7 +434,6 @@ def with_streaming_response(self) -> AsyncBenchmarksResourceWithStreamingRespons async def create( self, *, - is_public: bool, name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, @@ -458,8 +449,6 @@ async def create( Create a Benchmark with a set of Scenarios. Args: - is_public: Whether this benchmark is public. - name: The name of the Benchmark. This must be unique. metadata: User defined metadata to attach to the benchmark for organization. @@ -480,7 +469,6 @@ async def create( "/v1/benchmarks", body=await async_maybe_transform( { - "is_public": is_public, "name": name, "metadata": metadata, "scenario_ids": scenario_ids, @@ -534,7 +522,6 @@ async def update( self, id: str, *, - is_public: bool, name: str, metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN, @@ -550,8 +537,6 @@ async def update( Update a Benchmark with a set of Scenarios. Args: - is_public: Whether this benchmark is public. - name: The name of the Benchmark. This must be unique. metadata: User defined metadata to attach to the benchmark for organization. @@ -574,7 +559,6 @@ async def update( f"/v1/benchmarks/{id}", body=await async_maybe_transform( { - "is_public": is_public, "name": name, "metadata": metadata, "scenario_ids": scenario_ids, diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index ca56943f4..492e7b156 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -170,7 +170,7 @@ def create( metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, prebuilt: Optional[str] | NotGiven = NOT_GIVEN, - repository_connection: Optional[devbox_create_params.RepositoryConnection] | NotGiven = NOT_GIVEN, + repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN, snapshot_id: 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. @@ -216,7 +216,7 @@ def create( prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used together with (Snapshot ID, Blueprint ID, or Blueprint name). - repository_connection: Repository connection parameters for configuring repository integration. + repo_connection_id: Repository connection id the devbox should source its base image from. snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified. @@ -245,7 +245,7 @@ def create( "metadata": metadata, "name": name, "prebuilt": prebuilt, - "repository_connection": repository_connection, + "repo_connection_id": repo_connection_id, "snapshot_id": snapshot_id, }, devbox_create_params.DevboxCreateParams, @@ -1429,7 +1429,7 @@ async def create( metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN, name: Optional[str] | NotGiven = NOT_GIVEN, prebuilt: Optional[str] | NotGiven = NOT_GIVEN, - repository_connection: Optional[devbox_create_params.RepositoryConnection] | NotGiven = NOT_GIVEN, + repo_connection_id: Optional[str] | NotGiven = NOT_GIVEN, snapshot_id: 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. @@ -1475,7 +1475,7 @@ async def create( prebuilt: Reference to prebuilt Blueprint to create the Devbox from. Should not be used together with (Snapshot ID, Blueprint ID, or Blueprint name). - repository_connection: Repository connection parameters for configuring repository integration. + repo_connection_id: Repository connection id the devbox should source its base image from. snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified. @@ -1504,7 +1504,7 @@ async def create( "metadata": metadata, "name": name, "prebuilt": prebuilt, - "repository_connection": repository_connection, + "repo_connection_id": repo_connection_id, "snapshot_id": snapshot_id, }, devbox_create_params.DevboxCreateParams, diff --git a/src/runloop_api_client/resources/repositories.py b/src/runloop_api_client/resources/repositories.py index 909e05e7b..b580da7a2 100644 --- a/src/runloop_api_client/resources/repositories.py +++ b/src/runloop_api_client/resources/repositories.py @@ -6,7 +6,7 @@ import httpx -from ..types import repository_list_params, repository_create_params +from ..types import repository_list_params, repository_create_params, repository_refresh_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -272,6 +272,8 @@ def refresh( self, id: str, *, + blueprint_id: Optional[str] | NotGiven = NOT_GIVEN, + github_auth_token: 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, @@ -285,6 +287,10 @@ def refresh( repo's technical stack and developer environment requirements. Args: + blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint. + + github_auth_token: GitHub authentication token for accessing private repositories. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -299,6 +305,13 @@ def refresh( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._post( f"/v1/repositories/{id}/refresh", + body=maybe_transform( + { + "blueprint_id": blueprint_id, + "github_auth_token": github_auth_token, + }, + repository_refresh_params.RepositoryRefreshParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -557,6 +570,8 @@ async def refresh( self, id: str, *, + blueprint_id: Optional[str] | NotGiven = NOT_GIVEN, + github_auth_token: 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, @@ -570,6 +585,10 @@ async def refresh( repo's technical stack and developer environment requirements. Args: + blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint. + + github_auth_token: GitHub authentication token for accessing private repositories. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -584,6 +603,13 @@ async def refresh( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return await self._post( f"/v1/repositories/{id}/refresh", + body=await async_maybe_transform( + { + "blueprint_id": blueprint_id, + "github_auth_token": github_auth_token, + }, + repository_refresh_params.RepositoryRefreshParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/runloop_api_client/resources/scenarios/scenarios.py b/src/runloop_api_client/resources/scenarios/scenarios.py index 1adec8d66..2ff71e2c8 100644 --- a/src/runloop_api_client/resources/scenarios/scenarios.py +++ b/src/runloop_api_client/resources/scenarios/scenarios.py @@ -83,7 +83,6 @@ def create( self, *, input_context: InputContextParam, - is_public: bool, name: str, scoring_contract: ScoringContractParam, environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN, @@ -104,8 +103,6 @@ def create( Args: input_context: The input context for the Scenario. - is_public: Whether this scenario is public. - name: Name of the scenario. scoring_contract: The scoring contract for the Scenario. @@ -133,7 +130,6 @@ def create( body=maybe_transform( { "input_context": input_context, - "is_public": is_public, "name": name, "scoring_contract": scoring_contract, "environment_parameters": environment_parameters, @@ -190,7 +186,6 @@ def update( id: str, *, input_context: InputContextParam, - is_public: bool, name: str, scoring_contract: ScoringContractParam, environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN, @@ -211,8 +206,6 @@ def update( Args: input_context: The input context for the Scenario. - is_public: Whether this scenario is public. - name: Name of the scenario. scoring_contract: The scoring contract for the Scenario. @@ -242,7 +235,6 @@ def update( body=maybe_transform( { "input_context": input_context, - "is_public": is_public, "name": name, "scoring_contract": scoring_contract, "environment_parameters": environment_parameters, @@ -514,7 +506,6 @@ async def create( self, *, input_context: InputContextParam, - is_public: bool, name: str, scoring_contract: ScoringContractParam, environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN, @@ -535,8 +526,6 @@ async def create( Args: input_context: The input context for the Scenario. - is_public: Whether this scenario is public. - name: Name of the scenario. scoring_contract: The scoring contract for the Scenario. @@ -564,7 +553,6 @@ async def create( body=await async_maybe_transform( { "input_context": input_context, - "is_public": is_public, "name": name, "scoring_contract": scoring_contract, "environment_parameters": environment_parameters, @@ -621,7 +609,6 @@ async def update( id: str, *, input_context: InputContextParam, - is_public: bool, name: str, scoring_contract: ScoringContractParam, environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN, @@ -642,8 +629,6 @@ async def update( Args: input_context: The input context for the Scenario. - is_public: Whether this scenario is public. - name: Name of the scenario. scoring_contract: The scoring contract for the Scenario. @@ -673,7 +658,6 @@ async def update( body=await async_maybe_transform( { "input_context": input_context, - "is_public": is_public, "name": name, "scoring_contract": scoring_contract, "environment_parameters": environment_parameters, diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py index eff9bd405..3428ea1c9 100644 --- a/src/runloop_api_client/types/__init__.py +++ b/src/runloop_api_client/types/__init__.py @@ -45,6 +45,7 @@ from .repository_manifest_view import RepositoryManifestView as RepositoryManifestView from .devbox_snapshot_list_view import DevboxSnapshotListView as DevboxSnapshotListView from .devbox_upload_file_params import DevboxUploadFileParams as DevboxUploadFileParams +from .repository_refresh_params import RepositoryRefreshParams as RepositoryRefreshParams from .scenario_start_run_params import ScenarioStartRunParams as ScenarioStartRunParams from .benchmark_start_run_params import BenchmarkStartRunParams as BenchmarkStartRunParams from .blueprint_build_parameters import BlueprintBuildParameters as BlueprintBuildParameters diff --git a/src/runloop_api_client/types/benchmark_create_params.py b/src/runloop_api_client/types/benchmark_create_params.py index 7e1621f59..2a46ff0df 100644 --- a/src/runloop_api_client/types/benchmark_create_params.py +++ b/src/runloop_api_client/types/benchmark_create_params.py @@ -9,9 +9,6 @@ class BenchmarkCreateParams(TypedDict, total=False): - is_public: Required[bool] - """Whether this benchmark is public.""" - name: Required[str] """The name of the Benchmark. This must be unique.""" diff --git a/src/runloop_api_client/types/benchmark_run_view.py b/src/runloop_api_client/types/benchmark_run_view.py index 0f88d045b..baf97cf52 100644 --- a/src/runloop_api_client/types/benchmark_run_view.py +++ b/src/runloop_api_client/types/benchmark_run_view.py @@ -1,25 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel -from .scoring_contract_result_view import ScoringContractResultView - -__all__ = ["BenchmarkRunView", "ScenarioRun"] - - -class ScenarioRun(BaseModel): - scenario_id: str - """ID of the Scenario that has been run.""" - scoring_result: ScoringContractResultView = FieldInfo(alias="scoringResult") - """The scoring result of the ScenarioRun.""" - - scenario_run_id: Optional[str] = FieldInfo(alias="scenarioRunId", default=None) - """ID of the scenario run.""" +__all__ = ["BenchmarkRunView"] class BenchmarkRunView(BaseModel): @@ -32,12 +18,6 @@ class BenchmarkRunView(BaseModel): metadata: Dict[str, str] """User defined metadata to attach to the benchmark run for organization.""" - pending_scenarios: List[str] - """List of Scenarios that have yet to be scored.""" - - scenario_runs: List[ScenarioRun] - """List of Scenarios have been completed.""" - start_time_ms: int """The time the benchmark run execution started (Unix timestamp milliseconds).""" diff --git a/src/runloop_api_client/types/benchmark_update_params.py b/src/runloop_api_client/types/benchmark_update_params.py index a00a379e0..b3c0fd1fe 100644 --- a/src/runloop_api_client/types/benchmark_update_params.py +++ b/src/runloop_api_client/types/benchmark_update_params.py @@ -9,9 +9,6 @@ class BenchmarkUpdateParams(TypedDict, total=False): - is_public: Required[bool] - """Whether this benchmark is public.""" - name: Required[str] """The name of the Benchmark. This must be unique.""" diff --git a/src/runloop_api_client/types/devbox_create_params.py b/src/runloop_api_client/types/devbox_create_params.py index 65905f8a3..192fabe73 100644 --- a/src/runloop_api_client/types/devbox_create_params.py +++ b/src/runloop_api_client/types/devbox_create_params.py @@ -8,7 +8,7 @@ from .shared_params.launch_parameters import LaunchParameters from .shared_params.code_mount_parameters import CodeMountParameters -__all__ = ["DevboxCreateParams", "RepositoryConnection"] +__all__ = ["DevboxCreateParams"] class DevboxCreateParams(TypedDict, total=False): @@ -58,26 +58,11 @@ class DevboxCreateParams(TypedDict, total=False): Should not be used together with (Snapshot ID, Blueprint ID, or Blueprint name). """ - repository_connection: Optional[RepositoryConnection] - """Repository connection parameters for configuring repository integration.""" + repo_connection_id: Optional[str] + """Repository connection id the devbox should source its base image from.""" snapshot_id: Optional[str] """Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified. """ - - -class RepositoryConnection(TypedDict, total=False): - github_auth_token: Optional[str] - """ - GitHub authentication token for accessing private repositories when using - repository_connection_id. - """ - - repository_connection_id: Optional[str] - """Repository connection ID to use for the Devbox. - - When specified, the latest inspection blueprint will be used and workspace - maintenance commands will be run during boot. - """ diff --git a/src/runloop_api_client/types/devbox_view.py b/src/runloop_api_client/types/devbox_view.py index 0a056748e..6b6be39c5 100644 --- a/src/runloop_api_client/types/devbox_view.py +++ b/src/runloop_api_client/types/devbox_view.py @@ -6,7 +6,27 @@ from .._models import BaseModel from .shared.launch_parameters import LaunchParameters -__all__ = ["DevboxView"] +__all__ = ["DevboxView", "StateTransition"] + + +class StateTransition(BaseModel): + status: Optional[ + Literal["provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"] + ] = None + """The status of the Devbox. + + provisioning: Runloop is allocating and booting the necessary infrastructure + resources. initializing: Runloop defined boot scripts are running to enable the + environment for interaction. running: The Devbox is ready for interaction. + suspending: The Devbox disk is being snaphsotted and as part of suspension. + suspended: The Devbox disk is saved and no more active compute is being used for + the Devbox. resuming: The Devbox disk is being loaded as part of booting a + suspended Devbox. failure: The Devbox failed as part of booting or running user + requested actions. shutdown: The Devbox was successfully shutdown and no more + active compute is being used. + """ + + transition_time_ms: Optional[object] = None class DevboxView(BaseModel): @@ -29,6 +49,9 @@ class DevboxView(BaseModel): metadata: Dict[str, str] """The user defined Devbox metadata.""" + state_transitions: List[StateTransition] + """A list of state transitions in order with durations""" + status: Literal[ "provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown" ] diff --git a/src/runloop_api_client/types/repository_inspection_details.py b/src/runloop_api_client/types/repository_inspection_details.py index 4f685e09b..c978586a7 100644 --- a/src/runloop_api_client/types/repository_inspection_details.py +++ b/src/runloop_api_client/types/repository_inspection_details.py @@ -10,6 +10,9 @@ class RepositoryInspectionDetails(BaseModel): + id: str + """The ID of the inspection.""" + commit_sha: str """The sha of the inspected version of the Repository.""" @@ -29,6 +32,7 @@ class RepositoryInspectionDetails(BaseModel): "inspection_success", "image_build_success", "image_build_failure", + "inspection_user_manifest_added", ] """The status of the repository inspection.""" @@ -37,3 +41,9 @@ class RepositoryInspectionDetails(BaseModel): blueprint_name: Optional[str] = None """The blueprint name associated with this inspection if successful.""" + + user_manifest: Optional[RepositoryManifestView] = None + """ + User uploaded repository manifest containing container config and workspace + details. + """ diff --git a/src/runloop_api_client/types/repository_refresh_params.py b/src/runloop_api_client/types/repository_refresh_params.py new file mode 100644 index 000000000..e0eeae3e1 --- /dev/null +++ b/src/runloop_api_client/types/repository_refresh_params.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["RepositoryRefreshParams"] + + +class RepositoryRefreshParams(TypedDict, total=False): + blueprint_id: Optional[str] + """ID of blueprint to use as base for resulting RepositoryVersion blueprint.""" + + github_auth_token: Optional[str] + """GitHub authentication token for accessing private repositories.""" diff --git a/src/runloop_api_client/types/scenario_create_params.py b/src/runloop_api_client/types/scenario_create_params.py index b311c62b3..5bd2f3d90 100644 --- a/src/runloop_api_client/types/scenario_create_params.py +++ b/src/runloop_api_client/types/scenario_create_params.py @@ -16,9 +16,6 @@ class ScenarioCreateParams(TypedDict, total=False): input_context: Required[InputContextParam] """The input context for the Scenario.""" - is_public: Required[bool] - """Whether this scenario is public.""" - name: Required[str] """Name of the scenario.""" diff --git a/src/runloop_api_client/types/scenario_update_params.py b/src/runloop_api_client/types/scenario_update_params.py index 4c0ef1ad8..1004e7bc8 100644 --- a/src/runloop_api_client/types/scenario_update_params.py +++ b/src/runloop_api_client/types/scenario_update_params.py @@ -16,9 +16,6 @@ class ScenarioUpdateParams(TypedDict, total=False): input_context: Required[InputContextParam] """The input context for the Scenario.""" - is_public: Required[bool] - """Whether this scenario is public.""" - name: Required[str] """Name of the scenario.""" diff --git a/tests/api_resources/test_benchmarks.py b/tests/api_resources/test_benchmarks.py index c065cd847..c453baf0a 100644 --- a/tests/api_resources/test_benchmarks.py +++ b/tests/api_resources/test_benchmarks.py @@ -25,7 +25,6 @@ class TestBenchmarks: @parametrize def test_method_create(self, client: Runloop) -> None: benchmark = client.benchmarks.create( - is_public=True, name="name", ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -33,7 +32,6 @@ def test_method_create(self, client: Runloop) -> None: @parametrize def test_method_create_with_all_params(self, client: Runloop) -> None: benchmark = client.benchmarks.create( - is_public=True, name="name", metadata={"foo": "string"}, scenario_ids=["string"], @@ -43,7 +41,6 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: @parametrize def test_raw_response_create(self, client: Runloop) -> None: response = client.benchmarks.with_raw_response.create( - is_public=True, name="name", ) @@ -55,7 +52,6 @@ def test_raw_response_create(self, client: Runloop) -> None: @parametrize def test_streaming_response_create(self, client: Runloop) -> None: with client.benchmarks.with_streaming_response.create( - is_public=True, name="name", ) as response: assert not response.is_closed @@ -108,7 +104,6 @@ def test_path_params_retrieve(self, client: Runloop) -> None: def test_method_update(self, client: Runloop) -> None: benchmark = client.benchmarks.update( id="id", - is_public=True, name="name", ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -117,7 +112,6 @@ def test_method_update(self, client: Runloop) -> None: def test_method_update_with_all_params(self, client: Runloop) -> None: benchmark = client.benchmarks.update( id="id", - is_public=True, name="name", metadata={"foo": "string"}, scenario_ids=["string"], @@ -128,7 +122,6 @@ def test_method_update_with_all_params(self, client: Runloop) -> None: def test_raw_response_update(self, client: Runloop) -> None: response = client.benchmarks.with_raw_response.update( id="id", - is_public=True, name="name", ) @@ -141,7 +134,6 @@ def test_raw_response_update(self, client: Runloop) -> None: def test_streaming_response_update(self, client: Runloop) -> None: with client.benchmarks.with_streaming_response.update( id="id", - is_public=True, name="name", ) as response: assert not response.is_closed @@ -157,7 +149,6 @@ def test_path_params_update(self, client: Runloop) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.benchmarks.with_raw_response.update( id="", - is_public=True, name="name", ) @@ -321,7 +312,6 @@ class TestAsyncBenchmarks: @parametrize async def test_method_create(self, async_client: AsyncRunloop) -> None: benchmark = await async_client.benchmarks.create( - is_public=True, name="name", ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -329,7 +319,6 @@ async def test_method_create(self, async_client: AsyncRunloop) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -> None: benchmark = await async_client.benchmarks.create( - is_public=True, name="name", metadata={"foo": "string"}, scenario_ids=["string"], @@ -339,7 +328,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - @parametrize async def test_raw_response_create(self, async_client: AsyncRunloop) -> None: response = await async_client.benchmarks.with_raw_response.create( - is_public=True, name="name", ) @@ -351,7 +339,6 @@ async def test_raw_response_create(self, async_client: AsyncRunloop) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncRunloop) -> None: async with async_client.benchmarks.with_streaming_response.create( - is_public=True, name="name", ) as response: assert not response.is_closed @@ -404,7 +391,6 @@ async def test_path_params_retrieve(self, async_client: AsyncRunloop) -> None: async def test_method_update(self, async_client: AsyncRunloop) -> None: benchmark = await async_client.benchmarks.update( id="id", - is_public=True, name="name", ) assert_matches_type(BenchmarkView, benchmark, path=["response"]) @@ -413,7 +399,6 @@ async def test_method_update(self, async_client: AsyncRunloop) -> None: async def test_method_update_with_all_params(self, async_client: AsyncRunloop) -> None: benchmark = await async_client.benchmarks.update( id="id", - is_public=True, name="name", metadata={"foo": "string"}, scenario_ids=["string"], @@ -424,7 +409,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) - async def test_raw_response_update(self, async_client: AsyncRunloop) -> None: response = await async_client.benchmarks.with_raw_response.update( id="id", - is_public=True, name="name", ) @@ -437,7 +421,6 @@ async def test_raw_response_update(self, async_client: AsyncRunloop) -> None: async def test_streaming_response_update(self, async_client: AsyncRunloop) -> None: async with async_client.benchmarks.with_streaming_response.update( id="id", - is_public=True, name="name", ) as response: assert not response.is_closed @@ -453,7 +436,6 @@ async def test_path_params_update(self, async_client: AsyncRunloop) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.benchmarks.with_raw_response.update( id="", - is_public=True, name="name", ) diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index 1af1bbb6f..7097c6f69 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -79,10 +79,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: metadata={"foo": "string"}, name="name", prebuilt="prebuilt", - repository_connection={ - "github_auth_token": "github_auth_token", - "repository_connection_id": "repository_connection_id", - }, + repo_connection_id="repo_connection_id", snapshot_id="snapshot_id", ) assert_matches_type(DevboxView, devbox, path=["response"]) @@ -1012,10 +1009,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - metadata={"foo": "string"}, name="name", prebuilt="prebuilt", - repository_connection={ - "github_auth_token": "github_auth_token", - "repository_connection_id": "repository_connection_id", - }, + repo_connection_id="repo_connection_id", snapshot_id="snapshot_id", ) assert_matches_type(DevboxView, devbox, path=["response"]) diff --git a/tests/api_resources/test_repositories.py b/tests/api_resources/test_repositories.py index 2206e0273..c74290fbe 100644 --- a/tests/api_resources/test_repositories.py +++ b/tests/api_resources/test_repositories.py @@ -217,14 +217,23 @@ def test_path_params_list_inspections(self, client: Runloop) -> None: @parametrize def test_method_refresh(self, client: Runloop) -> None: repository = client.repositories.refresh( - "id", + id="id", + ) + assert_matches_type(object, repository, path=["response"]) + + @parametrize + def test_method_refresh_with_all_params(self, client: Runloop) -> None: + repository = client.repositories.refresh( + id="id", + blueprint_id="blueprint_id", + github_auth_token="github_auth_token", ) assert_matches_type(object, repository, path=["response"]) @parametrize def test_raw_response_refresh(self, client: Runloop) -> None: response = client.repositories.with_raw_response.refresh( - "id", + id="id", ) assert response.is_closed is True @@ -235,7 +244,7 @@ def test_raw_response_refresh(self, client: Runloop) -> None: @parametrize def test_streaming_response_refresh(self, client: Runloop) -> None: with client.repositories.with_streaming_response.refresh( - "id", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -249,7 +258,7 @@ def test_streaming_response_refresh(self, client: Runloop) -> None: def test_path_params_refresh(self, client: Runloop) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.repositories.with_raw_response.refresh( - "", + id="", ) @@ -452,14 +461,23 @@ async def test_path_params_list_inspections(self, async_client: AsyncRunloop) -> @parametrize async def test_method_refresh(self, async_client: AsyncRunloop) -> None: repository = await async_client.repositories.refresh( - "id", + id="id", + ) + assert_matches_type(object, repository, path=["response"]) + + @parametrize + async def test_method_refresh_with_all_params(self, async_client: AsyncRunloop) -> None: + repository = await async_client.repositories.refresh( + id="id", + blueprint_id="blueprint_id", + github_auth_token="github_auth_token", ) assert_matches_type(object, repository, path=["response"]) @parametrize async def test_raw_response_refresh(self, async_client: AsyncRunloop) -> None: response = await async_client.repositories.with_raw_response.refresh( - "id", + id="id", ) assert response.is_closed is True @@ -470,7 +488,7 @@ async def test_raw_response_refresh(self, async_client: AsyncRunloop) -> None: @parametrize async def test_streaming_response_refresh(self, async_client: AsyncRunloop) -> None: async with async_client.repositories.with_streaming_response.refresh( - "id", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -484,5 +502,5 @@ async def test_streaming_response_refresh(self, async_client: AsyncRunloop) -> N async def test_path_params_refresh(self, async_client: AsyncRunloop) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.repositories.with_raw_response.refresh( - "", + id="", ) diff --git a/tests/api_resources/test_scenarios.py b/tests/api_resources/test_scenarios.py index a55134679..7e77cd2a9 100644 --- a/tests/api_resources/test_scenarios.py +++ b/tests/api_resources/test_scenarios.py @@ -25,7 +25,6 @@ class TestScenarios: def test_method_create(self, client: Runloop) -> None: scenario = client.scenarios.create( input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -50,7 +49,6 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: "problem_statement": "problem_statement", "additional_context": {}, }, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -98,7 +96,6 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: def test_raw_response_create(self, client: Runloop) -> None: response = client.scenarios.with_raw_response.create( input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -124,7 +121,6 @@ def test_raw_response_create(self, client: Runloop) -> None: def test_streaming_response_create(self, client: Runloop) -> None: with client.scenarios.with_streaming_response.create( input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -191,7 +187,6 @@ def test_method_update(self, client: Runloop) -> None: scenario = client.scenarios.update( id="id", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -217,7 +212,6 @@ def test_method_update_with_all_params(self, client: Runloop) -> None: "problem_statement": "problem_statement", "additional_context": {}, }, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -266,7 +260,6 @@ def test_raw_response_update(self, client: Runloop) -> None: response = client.scenarios.with_raw_response.update( id="id", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -293,7 +286,6 @@ def test_streaming_response_update(self, client: Runloop) -> None: with client.scenarios.with_streaming_response.update( id="id", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -323,7 +315,6 @@ def test_path_params_update(self, client: Runloop) -> None: client.scenarios.with_raw_response.update( id="", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -457,7 +448,6 @@ class TestAsyncScenarios: async def test_method_create(self, async_client: AsyncRunloop) -> None: scenario = await async_client.scenarios.create( input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -482,7 +472,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - "problem_statement": "problem_statement", "additional_context": {}, }, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -530,7 +519,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - async def test_raw_response_create(self, async_client: AsyncRunloop) -> None: response = await async_client.scenarios.with_raw_response.create( input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -556,7 +544,6 @@ async def test_raw_response_create(self, async_client: AsyncRunloop) -> None: async def test_streaming_response_create(self, async_client: AsyncRunloop) -> None: async with async_client.scenarios.with_streaming_response.create( input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -623,7 +610,6 @@ async def test_method_update(self, async_client: AsyncRunloop) -> None: scenario = await async_client.scenarios.update( id="id", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -649,7 +635,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) - "problem_statement": "problem_statement", "additional_context": {}, }, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -698,7 +683,6 @@ async def test_raw_response_update(self, async_client: AsyncRunloop) -> None: response = await async_client.scenarios.with_raw_response.update( id="id", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -725,7 +709,6 @@ async def test_streaming_response_update(self, async_client: AsyncRunloop) -> No async with async_client.scenarios.with_streaming_response.update( id="id", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [ @@ -755,7 +738,6 @@ async def test_path_params_update(self, async_client: AsyncRunloop) -> None: await async_client.scenarios.with_raw_response.update( id="", input_context={"problem_statement": "problem_statement"}, - is_public=True, name="name", scoring_contract={ "scoring_function_parameters": [