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 fd5e39b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ git clone https://github.com/reboot-dev/resemble-examples.git
cd resemble-examples/
```



### Create and activate a virtual environment

Create a new Python virtual environment in which to install Resemble
Expand All @@ -133,8 +131,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 fd5e39b

Please sign in to comment.