forked from wrenn/python-sdk
Add sandbox filesystem methods (list_dir, mkdir, remove, upload, download, stream_upload, stream_download) and interactive PTY sessions (PtySession, AsyncPtySession) with reconnect support per FILE_TERMINAL.md spec. Refactor error handling into exceptions.py as shared handle_response(). Replace API-key-only proxy auth with unified _proxy_headers() supporting both API key and JWT. Fix stream_upload to build multipart manually instead of relying on httpx files= with generators. Switch Makefile SPEC_URL from main to dev branch. Regenerate models from updated OpenAPI spec (adds teams, channels, metrics, PTY endpoints). Add comprehensive unit and integration tests. Trim AGENTS.md to verified facts only.
37 lines
823 B
Makefile
37 lines
823 B
Makefile
# Makefile
|
|
.PHONY: generate lint test check test-integration
|
|
|
|
# Variables
|
|
SPEC_URL = "https://git.omukk.dev/wrenn/wrenn/raw/branch/dev/internal/api/openapi.yaml"
|
|
SPEC_PATH = "api/openapi.yaml"
|
|
|
|
generate:
|
|
@echo "Fetching latest OpenAPI spec from Git repo..."
|
|
|
|
mkdir -p api
|
|
|
|
curl -fsSL $(SPEC_URL) -o $(SPEC_PATH)
|
|
|
|
uv run datamodel-codegen \
|
|
--input $(SPEC_PATH) \
|
|
--output src/wrenn/models/_generated.py \
|
|
--output-model-type pydantic_v2.BaseModel \
|
|
--snake-case-field \
|
|
--field-constraints \
|
|
--use-schema-description \
|
|
--target-python-version 3.13 \
|
|
--use-annotated \
|
|
--openapi-scopes schemas
|
|
|
|
lint:
|
|
uv run ruff check src/
|
|
uv run ruff format --check src/
|
|
|
|
test:
|
|
uv run pytest tests/test_client.py -v
|
|
|
|
test-integration:
|
|
uv run pytest tests/ -v -m "integration or not integration"
|
|
|
|
check: lint test
|