diff --git a/src/runloop_api_client/sdk/async_.py b/src/runloop_api_client/sdk/async_.py index 23f87d6e9..91c552eba 100644 --- a/src/runloop_api_client/sdk/async_.py +++ b/src/runloop_api_client/sdk/async_.py @@ -219,17 +219,16 @@ class AsyncBlueprintOps: ... dockerfile="FROM ubuntu:22.04\\nRUN apt-get update", ... ) >>> blueprints = await runloop.blueprint.list() - + To use a local directory as a build context, use an object. Example: >>> from datetime import timedelta >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext - >>> >>> runloop = AsyncRunloopSDK() >>> obj = await runloop.object_storage.upload_from_dir( ... "./", - ... ttl=timedelta(hours=1), + ... ttl=timedelta(hours=1), ... ) >>> blueprint = await runloop.blueprint.create( ... name="my-blueprint", diff --git a/src/runloop_api_client/sdk/async_devbox.py b/src/runloop_api_client/sdk/async_devbox.py index 89080abef..2c77475ea 100644 --- a/src/runloop_api_client/sdk/async_devbox.py +++ b/src/runloop_api_client/sdk/async_devbox.py @@ -643,7 +643,6 @@ async def exec( >>> result = await shell.exec("npm install", stdout=lambda line: print(f"[LOG] {line}")) """ # Ensure shell_name is set and cannot be overridden by user params - params = dict(params) params["shell_name"] = self._shell_name return await self._devbox.cmd.exec(command, **params) @@ -677,7 +676,6 @@ async def exec_async( ... print("Task completed successfully!") """ # Ensure shell_name is set and cannot be overridden by user params - params = dict(params) params["shell_name"] = self._shell_name return await self._devbox.cmd.exec_async(command, **params) diff --git a/src/runloop_api_client/sdk/devbox.py b/src/runloop_api_client/sdk/devbox.py index cad396815..3ca1eb903 100644 --- a/src/runloop_api_client/sdk/devbox.py +++ b/src/runloop_api_client/sdk/devbox.py @@ -651,7 +651,6 @@ def exec( >>> result = shell.exec("npm install", stdout=lambda line: print(f"[LOG] {line}")) """ # Ensure shell_name is set and cannot be overridden by user params - params = dict(params) params["shell_name"] = self._shell_name return self._devbox.cmd.exec(command, **params) @@ -685,7 +684,6 @@ def exec_async( ... print("Task completed successfully!") """ # Ensure shell_name is set and cannot be overridden by user params - params = dict(params) params["shell_name"] = self._shell_name return self._devbox.cmd.exec_async(command, **params) diff --git a/src/runloop_api_client/sdk/sync.py b/src/runloop_api_client/sdk/sync.py index 99410c2d0..9268516b1 100644 --- a/src/runloop_api_client/sdk/sync.py +++ b/src/runloop_api_client/sdk/sync.py @@ -224,11 +224,10 @@ class BlueprintOps: Example: >>> from datetime import timedelta >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext - >>> >>> runloop = RunloopSDK() >>> obj = runloop.object_storage.upload_from_dir( ... "./", - ... ttl=timedelta(hours=1), + ... ttl=timedelta(hours=1), ... ) >>> blueprint = runloop.blueprint.create( ... name="my-blueprint", diff --git a/tests/smoketests/sdk/test_async_devbox.py b/tests/smoketests/sdk/test_async_devbox.py index fdaaa91ed..220bf6e22 100644 --- a/tests/smoketests/sdk/test_async_devbox.py +++ b/tests/smoketests/sdk/test_async_devbox.py @@ -930,34 +930,6 @@ async def test_shell_auto_generated_name(self, devbox: AsyncDevbox) -> None: output = await result.stdout() assert "test" in output - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) - async def test_shell_exec_with_additional_params(self, devbox: AsyncDevbox) -> None: - """Test that additional params are passed through correctly.""" - shell = devbox.shell("test-shell-params") - - # Test that additional params (like working_dir) are passed through correctly - # Note: shell_name should override any shell_name in params - result = await shell.exec("pwd", working_dir="/tmp") - - assert result.exit_code == 0 - output = (await result.stdout()).strip() - # Should be in /tmp due to working_dir param - assert output == "/tmp" - - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) - async def test_shell_exec_async_with_additional_params(self, devbox: AsyncDevbox) -> None: - """Test that additional params are passed through correctly in exec_async.""" - shell = devbox.shell("test-shell-async-params") - - # Test that additional params are passed through correctly - execution = await shell.exec_async("pwd", working_dir="/home") - - result = await execution.result() - assert result.exit_code == 0 - output = (await result.stdout()).strip() - # Should be in /home due to working_dir param - assert output == "/home" - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) async def test_shell_exec_with_stderr_streaming(self, devbox: AsyncDevbox) -> None: """Test shell exec with stderr streaming callback.""" diff --git a/tests/smoketests/sdk/test_async_storage_object.py b/tests/smoketests/sdk/test_async_storage_object.py index fcca2a928..19a6d4f39 100644 --- a/tests/smoketests/sdk/test_async_storage_object.py +++ b/tests/smoketests/sdk/test_async_storage_object.py @@ -14,6 +14,7 @@ THIRTY_SECOND_TIMEOUT = 30 TWO_MINUTE_TIMEOUT = 120 +FOUR_MINUTE_TIMEOUT = 240 class TestAsyncStorageObjectLifecycle: @@ -464,7 +465,7 @@ async def test_complete_upload_download_workflow(self, async_sdk_client: AsyncRu # Delete await obj.delete() - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) + @pytest.mark.timeout(FOUR_MINUTE_TIMEOUT) async def test_storage_object_in_devbox_workflow(self, async_sdk_client: AsyncRunloopSDK) -> None: """Test workflow: create storage object, write from devbox, download.""" # Create empty storage object diff --git a/tests/smoketests/sdk/test_devbox.py b/tests/smoketests/sdk/test_devbox.py index 7238d27bb..9535e388e 100644 --- a/tests/smoketests/sdk/test_devbox.py +++ b/tests/smoketests/sdk/test_devbox.py @@ -918,34 +918,6 @@ def test_shell_auto_generated_name(self, devbox: Devbox) -> None: output = result.stdout() assert "test" in output - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) - def test_shell_exec_with_additional_params(self, devbox: Devbox) -> None: - """Test that additional params are passed through correctly.""" - shell = devbox.shell("test-shell-params") - - # Test that additional params (like working_dir) are passed through correctly - # Note: shell_name should override any shell_name in params - result = shell.exec("pwd", working_dir="/tmp") - - assert result.exit_code == 0 - output = result.stdout().strip() - # Should be in /tmp due to working_dir param - assert output == "/tmp" - - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) - def test_shell_exec_async_with_additional_params(self, devbox: Devbox) -> None: - """Test that additional params are passed through correctly in exec_async.""" - shell = devbox.shell("test-shell-async-params") - - # Test that additional params are passed through correctly - execution = shell.exec_async("pwd", working_dir="/home") - - result = execution.result() - assert result.exit_code == 0 - output = result.stdout().strip() - # Should be in /home due to working_dir param - assert output == "/home" - @pytest.mark.timeout(TWO_MINUTE_TIMEOUT) def test_shell_exec_with_stderr_streaming(self, devbox: Devbox) -> None: """Test shell exec with stderr streaming callback."""