Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions features/activity/cancel_try_cancel/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ async def cancellable_activity() -> None:
result = "cancelled"

# Send result as signal to workflow
await client.get_workflow_handle_for(
Workflow.run, activity.info().workflow_id or ""
).signal(Workflow.activity_result, result)
await client.get_workflow_handle(activity.info().workflow_id or "").signal(
Workflow.activity_result, result
)


async def start(runner: Runner) -> WorkflowHandle:
Expand Down
4 changes: 2 additions & 2 deletions features/continue_as_new/continue_as_same/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ async def run(self, input: str) -> str:

async def start(runner: Runner) -> WorkflowHandle:
return await runner.client.start_workflow(
Workflow,
Workflow.run,
INPUT_DATA,
id=WORKFLOW_ID,
arg=INPUT_DATA,
memo={
MEMO_KEY: MEMO_VALUE,
},
Expand Down
4 changes: 2 additions & 2 deletions features/signal/basic/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ async def my_signal(self, arg: str):


async def start(runner: Runner) -> WorkflowHandle:
handle: WorkflowHandle = await runner.client.start_workflow(
Workflow,
handle = await runner.client.start_workflow(
Workflow.run,
id="workflow-id",
task_queue=runner.task_queue,
execution_timeout=timedelta(minutes=1),
Expand Down
13 changes: 13 additions & 0 deletions sdkbuild/python.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ requires-python = "~=3.10"
if err := executeCommand("uv", "sync"); err != nil {
return nil, fmt.Errorf("failed installing: %w", err)
}
// Install mypy for type checking
if err := executeCommand("uv", "add", "--dev", "mypy"); err != nil {
return nil, fmt.Errorf("failed installing mypy: %w", err)
}

// Create __init__.py files in feature directories to make them proper Python packages
if err := executeCommand("find", "../features", "-type", "d", "-exec", "touch", "{}/__init__.py", ";"); err != nil {
return nil, fmt.Errorf("failed creating __init__.py files: %w", err)
}

if err := executeCommand("uv", "run", "mypy", "--explicit-package-bases", "../features"); err != nil {
return nil, fmt.Errorf("failed type checking: %w", err)
}

success = true
return &PythonProgram{dir}, nil
Expand Down
Loading