Skip to content

Commit

Permalink
[Release] Update the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
reboot-dev-bot committed Oct 2, 2023
1 parent eb3ced0 commit 3b5beca
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ requirements and run an application:
<!-- MARKDOWN-AUTO-DOCS:START (CODE:src=./readme_test.sh&lines=32-33) -->
<!-- The below code snippet is automatically added from ./readme_test.sh -->
```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
```
<!-- MARKDOWN-AUTO-DOCS:END -->

Expand Down
6 changes: 4 additions & 2 deletions hello-constructors/backend/src/main.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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}'")


Expand Down
6 changes: 4 additions & 2 deletions hello-constructors/backend/tests/greeter_servicer_test.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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")
2 changes: 1 addition & 1 deletion hello-world/backend/src/main.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion hello-world/backend/tests/greeter_servicer_test.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 3b5beca

Please sign in to comment.