From 3b5beca4066e38b7a5b0c7d6ca947614890753b6 Mon Sep 17 00:00:00 2001 From: Rebot <96078724+reboot-dev-bot@users.noreply.github.com> Date: Mon, 2 Oct 2023 23:03:42 +0000 Subject: [PATCH] [Release] Update the examples --- README.md | 4 ++-- hello-constructors/backend/src/main.py | 6 ++++-- hello-constructors/backend/tests/greeter_servicer_test.py | 6 ++++-- hello-world/backend/src/main.py | 2 +- hello-world/backend/tests/greeter_servicer_test.py | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d0cc9a3..5df1fe8 100644 --- a/README.md +++ b/README.md @@ -133,8 +133,8 @@ requirements and run an application: ```sh -python -m venv ./.hello-world-venv -source ./.hello-world-venv/bin/activate +python -m venv ./.hello-constructors-venv +source ./.hello-constructors-venv/bin/activate ``` diff --git a/hello-constructors/backend/src/main.py b/hello-constructors/backend/src/main.py index e295dc7..0543913 100755 --- a/hello-constructors/backend/src/main.py +++ b/hello-constructors/backend/src/main.py @@ -1,7 +1,7 @@ import asyncio import logging -from hello_constructors.v1.greeter_rsm import Greeter, GreetResponse from greeter_servicer import GreeterServicer +from hello_constructors.v1.greeter_rsm import Greeter, GreetResponse from resemble.aio.applications import Application from resemble.aio.workflows import Workflow @@ -17,7 +17,9 @@ async def initialize(workflow: Workflow): await greeter.Create(workflow, greeting="Hello") # Demonstrate that we can use the actor. - response: GreetResponse = await greeter.Greet(workflow, name="Constructors") + response: GreetResponse = await greeter.Greet( + workflow, name="Constructors" + ) logging.info(f"Received a greeting: '{response.message}'") diff --git a/hello-constructors/backend/tests/greeter_servicer_test.py b/hello-constructors/backend/tests/greeter_servicer_test.py index 683a618..cf13873 100644 --- a/hello-constructors/backend/tests/greeter_servicer_test.py +++ b/hello-constructors/backend/tests/greeter_servicer_test.py @@ -1,6 +1,6 @@ import unittest -from hello_constructors.v1.greeter_rsm import Greeter, GreetResponse from greeter_servicer import GreeterServicer +from hello_constructors.v1.greeter_rsm import Greeter, GreetResponse from resemble.aio.tests import Resemble from resemble.aio.workflows import Workflow @@ -25,5 +25,7 @@ async def test_hello_constructors(self) -> None: # before other methods can be called on it. await greeter.Create(workflow, greeting="Hello") - response: GreetResponse = await greeter.Greet(workflow, name="Constructors") + response: GreetResponse = await greeter.Greet( + workflow, name="Constructors" + ) self.assertEqual(response.message, "Hello, Constructors") diff --git a/hello-world/backend/src/main.py b/hello-world/backend/src/main.py index 0a21ea7..d0e2a95 100755 --- a/hello-world/backend/src/main.py +++ b/hello-world/backend/src/main.py @@ -1,7 +1,7 @@ import asyncio import logging -from hello_world.v1.greeter_rsm import Greeter, GreetResponse from greeter_servicer import GreeterServicer +from hello_world.v1.greeter_rsm import Greeter, GreetResponse from resemble.aio.applications import Application from resemble.aio.workflows import Workflow diff --git a/hello-world/backend/tests/greeter_servicer_test.py b/hello-world/backend/tests/greeter_servicer_test.py index 6cab9e6..e675007 100644 --- a/hello-world/backend/tests/greeter_servicer_test.py +++ b/hello-world/backend/tests/greeter_servicer_test.py @@ -1,6 +1,6 @@ import unittest -from hello_world.v1.greeter_rsm import Greeter, GreetResponse from greeter_servicer import GreeterServicer +from hello_world.v1.greeter_rsm import Greeter, GreetResponse from resemble.aio.tests import Resemble from resemble.aio.workflows import Workflow