Skip to content

Commit 4ef5b47

Browse files
committed
remove unnecessary protocols.py to clean up docs, adjusted doc order to sort by source declaration order (except in base api type reference)
1 parent 5684195 commit 4ef5b47

File tree

9 files changed

+30
-238
lines changed

9 files changed

+30
-238
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
# Autodoc settings
4343
autodoc_default_options = {
4444
"members": None,
45+
"member-order": "bysource",
4546
}
4647

4748
autodoc_typehints = "description"

docs/sdk/async/devbox.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ Devbox
44
The ``AsyncDevbox`` class provides asynchronous methods for managing and interacting with a devbox instance.
55

66
.. automodule:: runloop_api_client.sdk.async_devbox
7-
:members:
8-
9-
.. automodule:: runloop_api_client.sdk.protocols
10-
:members: AsyncCommandInterface, AsyncFileInterface, AsyncNetworkInterface
11-
:undoc-members:
7+
:members:

docs/sdk/sync/devbox.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ Devbox
44
The ``Devbox`` class provides synchronous methods for managing and interacting with a devbox instance.
55

66
.. automodule:: runloop_api_client.sdk.devbox
7-
:members:
8-
9-
.. automodule:: runloop_api_client.sdk.protocols
10-
:members: CommandInterface, FileInterface, NetworkInterface
11-
:undoc-members:
7+
:members:

docs/sdk/types.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ Base API Type Reference
102102
:members:
103103
:undoc-members:
104104
:imported-members:
105+
:member-order: groupwise
105106

106107
.. automodule:: runloop_api_client.types
107108
:members:
108109
:undoc-members:
109-
:imported-members:
110+
:imported-members:
111+
:member-order: groupwise

src/runloop_api_client/sdk/async_devbox.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
)
3333
from .._client import AsyncRunloop
3434
from ._helpers import filter_params
35-
from .protocols import AsyncFileInterface, AsyncCommandInterface, AsyncNetworkInterface
3635
from .._streaming import AsyncStream
3736
from ..lib.polling import PollingConfig
3837
from .async_execution import AsyncExecution, _AsyncStreamingGroup
@@ -259,7 +258,7 @@ def cmd(self) -> AsyncCommandInterface:
259258
:return: Helper for running shell commands
260259
:rtype: AsyncCommandInterface
261260
"""
262-
return _AsyncCommandInterface(self)
261+
return AsyncCommandInterface(self)
263262

264263
@property
265264
def file(self) -> AsyncFileInterface:
@@ -268,7 +267,7 @@ def file(self) -> AsyncFileInterface:
268267
:return: Helper for reading/writing files
269268
:rtype: AsyncFileInterface
270269
"""
271-
return _AsyncFileInterface(self)
270+
return AsyncFileInterface(self)
272271

273272
@property
274273
def net(self) -> AsyncNetworkInterface:
@@ -277,7 +276,7 @@ def net(self) -> AsyncNetworkInterface:
277276
:return: Helper for SSH keys and tunnels
278277
:rtype: AsyncNetworkInterface
279278
"""
280-
return _AsyncNetworkInterface(self)
279+
return AsyncNetworkInterface(self)
281280

282281
# ------------------------------------------------------------------ #
283282
# Internal helpers
@@ -357,7 +356,7 @@ async def _stream_worker(
357356
logger.exception("error streaming %s logs for devbox %s", name, self._id)
358357

359358

360-
class _AsyncCommandInterface:
359+
class AsyncCommandInterface:
361360
"""Interface for executing commands on a devbox.
362361
363362
Accessed via devbox.cmd property. Provides exec() for synchronous execution
@@ -457,7 +456,7 @@ async def exec_async(
457456
return AsyncExecution(client, devbox.id, execution, streaming_group)
458457

459458

460-
class _AsyncFileInterface:
459+
class AsyncFileInterface:
461460
"""Interface for file operations on a devbox.
462461
463462
Accessed via devbox.file property. Provides coroutines for reading, writing,
@@ -547,7 +546,7 @@ async def upload(
547546
)
548547

549548

550-
class _AsyncNetworkInterface:
549+
class AsyncNetworkInterface:
551550
"""Interface for networking operations on a devbox.
552551
553552
Accessed via devbox.net property. Provides coroutines for SSH access and tunneling.

src/runloop_api_client/sdk/devbox.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
from .._client import Runloop
3535
from ._helpers import filter_params
3636
from .execution import Execution, _StreamingGroup
37-
from .protocols import FileInterface, CommandInterface, NetworkInterface
3837
from .._streaming import Stream
3938
from ..lib.polling import PollingConfig
4039
from .execution_result import ExecutionResult
@@ -261,7 +260,7 @@ def cmd(self) -> CommandInterface:
261260
:return: Helper for running shell commands
262261
:rtype: CommandInterface
263262
"""
264-
return _CommandInterface(self)
263+
return CommandInterface(self)
265264

266265
@property
267266
def file(self) -> FileInterface:
@@ -270,7 +269,7 @@ def file(self) -> FileInterface:
270269
:return: Helper for reading/writing files
271270
:rtype: FileInterface
272271
"""
273-
return _FileInterface(self)
272+
return FileInterface(self)
274273

275274
@property
276275
def net(self) -> NetworkInterface:
@@ -279,7 +278,7 @@ def net(self) -> NetworkInterface:
279278
:return: Helper for SSH keys and tunnels
280279
:rtype: NetworkInterface
281280
"""
282-
return _NetworkInterface(self)
281+
return NetworkInterface(self)
283282

284283
# --------------------------------------------------------------------- #
285284
# Internal helpers
@@ -375,7 +374,7 @@ def worker() -> None:
375374
return thread
376375

377376

378-
class _CommandInterface:
377+
class CommandInterface:
379378
"""Interface for executing commands on a devbox.
380379
381380
Accessed via devbox.cmd property. Provides exec() for synchronous execution
@@ -465,7 +464,7 @@ def exec_async(
465464
return Execution(client, devbox.id, execution, streaming_group)
466465

467466

468-
class _FileInterface:
467+
class FileInterface:
469468
"""Interface for file operations on a devbox.
470469
471470
Accessed via devbox.file property. Provides methods for reading, writing,
@@ -555,7 +554,7 @@ def upload(
555554
)
556555

557556

558-
class _NetworkInterface:
557+
class NetworkInterface:
559558
"""Interface for network operations on a devbox.
560559
561560
Accessed via devbox.net property. Provides methods for SSH access and tunneling.

src/runloop_api_client/sdk/protocols.py

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)