Rework grpc locations and add some different structure#2
Conversation
| @@ -0,0 +1,54 @@ | |||
| import logging | |||
There was a problem hiding this comment.
We can test just the protos since as I mentioned before we don't need to generate the grpc output.
There was a problem hiding this comment.
I think it's reasonable not only to confirm the pure Python client works, but to show even what using a pure python gRPC client looks like. Not committing protos makes discovery horrible for code/repo readers.
| @@ -0,0 +1 @@ | |||
| from .core_interface_pb2 import ActivityHeartbeat, ActivityTaskCompletion | |||
There was a problem hiding this comment.
This is part of the auto-generated code, but I think it still deserves to be checked in to keep the dir here. But if there's disagreement, I can remove this and add .gitkeep to this dir instead (or just mkdir it during build).
| - Build the project | ||
|
|
||
| ```bash | ||
| poe build |
There was a problem hiding this comment.
There's also a poetry build command, I think we could integrate with that.
Not blocking this PR.
| [tool.poetry.dependencies] | ||
| python = "^3.7" | ||
| grpcio = "^1.43.0" | ||
| python = "^3.7" |
There was a problem hiding this comment.
Do we want to restrict to python<3.10?
There was a problem hiding this comment.
Why not 3.10? I use 3.10 successfully on Windows.
| with (base_path / "__init__.py").open("w") as f: | ||
| for stem, messages in imports.items(): | ||
| for message in messages: | ||
| f.write(f"from .{stem} import {message}\n") |
| content = fix_api_import(content) | ||
| content = fix_dependency_import(content) | ||
| content = fix_sdk_import(content) |
There was a problem hiding this comment.
nit: you can use a single re.sub call with a callback https://docs.python.org/3/library/re.html#re.sub
Not blocking the PR of course.
What was changed
temporalio/proto/temporal/api->temporalio/apitemporalio/proto/dependencies->temporalio/api/dependenciestemporalio/proto/temporal/sdk->temporalio/bridge/protoLICENSEisortto format/lint taskmypylint check and mypy-protobuf supportpytesttask