Skip to content

Commit 25d8a01

Browse files
authored
(feat): add python object-oriented sdk (#667)
* Increase pytest workers from 2 to 10 * Reduce pytest workers from 10 to 5 * initial llm work * added await_suspended methods to base api * added await_completed methods to base api * unit and smoke tests for base api changes * added snapshot_disk methods to devbox classes * big refactor (moved client classes to _sync.py and _async.py, and moved shared methods/types to _helpers.py) * linting, formattting, and type checking changes * lint fixes * circular import fixes * circular import fixes (async) * lint fix * unit tests * unit test refactoring * async client accepts new blueprint create_and_await_build_complete parameters * added file system mounts to devbox creation parameters and cleaned up default parameters (matches base api) * fixed snapshot list, cleaned up getattr * abandon trying to support other upload file types for devbox file uploads (sticks to base api FileType) * smoke tests * fixed tests to expect updated parameter/member names * lint fixes * docs + examples * add missing mount parameters * lint fixes * unpack TypedDict params directly instead of explicitly declaring them * corrected examples * cleaned up underscore prefixes: renamed sync and async modules, and added protocol interface for devbox cmd/file/net * update docs to correct await async devboxes and not use async callbacks (not supported) * added module-level docstrings * formatting changes * fixed unit test imports * fixed expected status for snapshot delete smoketests * Add coverage files to .gitignore and remove .coverage from tracking * increased timeout for snapshot tests * clean up default value for max_retries * remove examples (for now). will upload verified examples later * python sdk manual types (and small fixes/cleanups) * fixed execution result stdout/stderr * unit tests * end to end tests * uv.lock version update * add maintainence comments for manually edited types files * paginated stdout/stderr in ExecutionResult (#670) * added pagination logic to stdout/stderr * unit test adjustments * added smoke tests and todos for fixing and testing output line counting logic * increased smoke test timeouts * scoped docstrings for public modules, classes and methods * formatting fixes * rename ExecutionResult .raw to .result * declare terminal states for devboxes.await_suspended * visual separation of sync vs async devbox protocols, examples for async execution interface * update maintenance instructions for DevboxCreateParams * change manager class suffixes from Client to Ops * remove unnecessary tests from blueprint and snapshot smoke tests * lint fixes * increase timeout for async sdk client smoke tests * updated sdk readme
1 parent b7d7d1e commit 25d8a01

72 files changed

Lines changed: 14610 additions & 23 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/smoketests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
4949
- name: Run smoke tests (pytest via uv)
5050
env:
51-
# Use 2 workers to run files in parallel.
51+
# Use 5 workers to run files in parallel.
5252
# Tests within a file are run sequentially.
53-
PYTEST_ADDOPTS: "-n 2 -m smoketest"
53+
PYTEST_ADDOPTS: "-n 5 -m smoketest"
5454
run: |
5555
uv run pytest -q -vv tests/smoketests

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,13 @@ dist
1414
codegen.log
1515
Brewfile.lock.json
1616

17-
.DS_Store
17+
.DS_Store
18+
19+
# Coverage files
20+
.coverage
21+
.coverage.*
22+
htmlcov/
23+
coverage.json
24+
coverage-summary.json
25+
*.cover
26+
.pytest_cache/

0 commit comments

Comments
 (0)