Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release] Update the examples #17

Closed
wants to merge 1 commit into from
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
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
Loading