Skip to content

Commit

Permalink
Minor fixes (#268)
Browse files Browse the repository at this point in the history
Fixes #254
Fixes #263
  • Loading branch information
cretz committed Feb 8, 2023
1 parent 832c375 commit 3c8ee0a
Show file tree
Hide file tree
Showing 79 changed files with 1,285 additions and 1,146 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,12 @@ poe test

This runs against [Temporalite](https://github.com/temporalio/temporalite). To run against the time-skipping test
server, pass `--workflow-environment time-skipping`. To run against the `default` namespace of an already-running
server, pass the `host:port` to `--workflow-environment`.
server, pass the `host:port` to `--workflow-environment`. Can also use regular pytest arguments. For example, here's how
to run a single test with debug logs on the console:

```bash
poe test -s --log-cli-level=DEBUG -k test_sync_activity_thread_cancel_caught
```

#### Proto Generation and Testing

Expand Down
1,731 changes: 860 additions & 871 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ types-protobuf = "~3.20"
typing-extensions = "^4.2.0"

[tool.poetry.dev-dependencies]
black = "^22.3.0"
black = "^23.1.0"
cibuildwheel = "^2.11.0"
grpcio-tools = "^1.48.0"
isort = "^5.11.3"
mypy = "^0.971"
isort = "^5.11.5"
mypy = "^1.0.0"
mypy-protobuf = "^3.3.0"
protoc-wheel-0 = "^21.1"
psutil = "^5.9.3"
Expand Down Expand Up @@ -76,7 +76,7 @@ lint = [
# TODO(cretz): Why does pydocstyle complain about @overload missing docs after
# https://github.com/PyCQA/pydocstyle/pull/511?
lint-docs = "pydocstyle --ignore-decorators=overload"
lint-types = "mypy --namespace-packages ."
lint-types = "mypy --namespace-packages --check-untyped-defs ."
run-bench = "python scripts/run_bench.py"
test = "pytest"

Expand Down
2 changes: 2 additions & 0 deletions scripts/run_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from temporalio.worker import UnsandboxedWorkflowRunner, Worker
from temporalio.worker.workflow_sandbox import SandboxedWorkflowRunner

assert sys.version_info >= (3, 9)


@workflow.defn
class BenchWorkflow:
Expand Down
1 change: 0 additions & 1 deletion temporalio/api/batch/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/cluster/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/command/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 22 additions & 19 deletions temporalio/api/command/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1148,24 +1148,27 @@ class Command(google.protobuf.message.Message):
) -> None: ...
def WhichOneof(
self, oneof_group: typing_extensions.Literal["attributes", b"attributes"]
) -> typing_extensions.Literal[
"schedule_activity_task_command_attributes",
"start_timer_command_attributes",
"complete_workflow_execution_command_attributes",
"fail_workflow_execution_command_attributes",
"request_cancel_activity_task_command_attributes",
"cancel_timer_command_attributes",
"cancel_workflow_execution_command_attributes",
"request_cancel_external_workflow_execution_command_attributes",
"record_marker_command_attributes",
"continue_as_new_workflow_execution_command_attributes",
"start_child_workflow_execution_command_attributes",
"signal_external_workflow_execution_command_attributes",
"upsert_workflow_search_attributes_command_attributes",
"accept_workflow_update_command_attributes",
"complete_workflow_update_command_attributes",
"modify_workflow_properties_command_attributes",
"reject_workflow_update_command_attributes",
] | None: ...
) -> (
typing_extensions.Literal[
"schedule_activity_task_command_attributes",
"start_timer_command_attributes",
"complete_workflow_execution_command_attributes",
"fail_workflow_execution_command_attributes",
"request_cancel_activity_task_command_attributes",
"cancel_timer_command_attributes",
"cancel_workflow_execution_command_attributes",
"request_cancel_external_workflow_execution_command_attributes",
"record_marker_command_attributes",
"continue_as_new_workflow_execution_command_attributes",
"start_child_workflow_execution_command_attributes",
"signal_external_workflow_execution_command_attributes",
"upsert_workflow_search_attributes_command_attributes",
"accept_workflow_update_command_attributes",
"complete_workflow_update_command_attributes",
"modify_workflow_properties_command_attributes",
"reject_workflow_update_command_attributes",
]
| None
): ...

global___Command = Command
1 change: 0 additions & 1 deletion temporalio/api/common/v1/grpc_status_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/common/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/batch_operation_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/command_type_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/event_type_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/failed_cause_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/interaction_type_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/namespace_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/query_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/reset_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/schedule_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/task_queue_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/update_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/enums/v1/workflow_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/errordetails/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/failure/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions temporalio/api/failure/v1/message_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,18 @@ class Failure(google.protobuf.message.Message):
) -> None: ...
def WhichOneof(
self, oneof_group: typing_extensions.Literal["failure_info", b"failure_info"]
) -> typing_extensions.Literal[
"application_failure_info",
"timeout_failure_info",
"canceled_failure_info",
"terminated_failure_info",
"server_failure_info",
"reset_workflow_failure_info",
"activity_failure_info",
"child_workflow_execution_failure_info",
] | None: ...
) -> (
typing_extensions.Literal[
"application_failure_info",
"timeout_failure_info",
"canceled_failure_info",
"terminated_failure_info",
"server_failure_info",
"reset_workflow_failure_info",
"activity_failure_info",
"child_workflow_execution_failure_info",
]
| None
): ...

global___Failure = Failure
1 change: 0 additions & 1 deletion temporalio/api/filter/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion temporalio/api/history/v1/message_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c8ee0a

Please sign in to comment.