Skip to content
Closed
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
1 change: 1 addition & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build Binaries
on:
pull_request:
push:
branches:
- main
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords = [
"workflow",
]
dependencies = [
"nexus-rpc>=1.1.0",
"nexus-rpc==1.1.0",
"protobuf>=3.20,<6",
"python-dateutil>=2.8.2,<3 ; python_version < '3.11'",
"types-protobuf>=3.20",
Expand Down Expand Up @@ -231,6 +231,3 @@ exclude = [
[tool.uv]
# Prevent uv commands from building the package by default
package = false

[tool.uv.sources]
nexus-rpc = { git = "https://github.com/nexus-rpc/sdk-python.git", rev = "35f574c711193a6e2560d3e6665732a5bb7ae92c" }
2 changes: 1 addition & 1 deletion temporalio/nexus/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async def _start(
return WorkflowRunOperationHandler(_start, input_type, output_type)

method_name = get_callable_name(start)
nexusrpc.set_operation(
nexusrpc.set_operation_definition(
operation_handler_factory,
nexusrpc.Operation(
name=name or method_name,
Expand Down
4 changes: 2 additions & 2 deletions temporalio/worker/_interceptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def __post_init__(self) -> None:
if isinstance(self.operation, nexusrpc.Operation):
self.output_type = self.operation.output_type
elif callable(self.operation):
if op := nexusrpc.get_operation(self.operation):
if op := nexusrpc.get_operation_definition(self.operation):
self.output_type = op.output_type
else:
raise ValueError(
Expand All @@ -325,7 +325,7 @@ def operation_name(self) -> str:
elif isinstance(self.operation, str):
return self.operation
elif callable(self.operation):
if op := nexusrpc.get_operation(self.operation):
if op := nexusrpc.get_operation_definition(self.operation):
return op.name
else:
raise ValueError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ async def test_run_nexus_service_from_programmatically_created_service_handler(
service_handler = nexusrpc.handler._core.ServiceHandler(
service=nexusrpc.ServiceDefinition(
name="MyService",
operation_definitions={
"increment": nexusrpc.OperationDefinition[int, int](
operations={
"increment": nexusrpc.Operation[int, int](
name="increment",
method_name="increment",
input_type=int,
Expand Down
4 changes: 3 additions & 1 deletion tests/nexus/test_handler_operation_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ async def test_collected_operation_names(
assert isinstance(service_defn, nexusrpc.ServiceDefinition)
assert service_defn.name == "Service"
for method_name, expected_op in test_case.expected_operations.items():
actual_op = nexusrpc.get_operation(getattr(test_case.Service, method_name))
actual_op = nexusrpc.get_operation_definition(
getattr(test_case.Service, method_name)
)
assert isinstance(actual_op, nexusrpc.Operation)
assert actual_op.name == expected_op.name
assert actual_op.input_type == expected_op.input_type
Expand Down
8 changes: 6 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading