orcher-sdk 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orcher_sdk-0.4.0/CHANGELOG.md +1 -0
- orcher_sdk-0.4.0/CONTRIBUTING.md +54 -0
- orcher_sdk-0.4.0/Cargo.lock +2120 -0
- orcher_sdk-0.4.0/Cargo.toml +63 -0
- orcher_sdk-0.4.0/LICENSE +201 -0
- orcher_sdk-0.4.0/PKG-INFO +352 -0
- orcher_sdk-0.4.0/README.md +310 -0
- orcher_sdk-0.4.0/native/src/actor_state.rs +395 -0
- orcher_sdk-0.4.0/native/src/client.rs +879 -0
- orcher_sdk-0.4.0/native/src/codec.rs +371 -0
- orcher_sdk-0.4.0/native/src/convert.rs +187 -0
- orcher_sdk-0.4.0/native/src/error.rs +166 -0
- orcher_sdk-0.4.0/native/src/journal_times.rs +194 -0
- orcher_sdk-0.4.0/native/src/lib.rs +198 -0
- orcher_sdk-0.4.0/native/src/runtime.rs +64 -0
- orcher_sdk-0.4.0/native/src/types.rs +559 -0
- orcher_sdk-0.4.0/native/src/worker.rs +2148 -0
- orcher_sdk-0.4.0/pyproject.toml +114 -0
- orcher_sdk-0.4.0/src/orcher/__init__.py +211 -0
- orcher_sdk-0.4.0/src/orcher/_internal/__init__.py +34 -0
- orcher_sdk-0.4.0/src/orcher/_internal/async_utils.py +160 -0
- orcher_sdk-0.4.0/src/orcher/_internal/logging.py +75 -0
- orcher_sdk-0.4.0/src/orcher/_internal/utils.py +139 -0
- orcher_sdk-0.4.0/src/orcher/_native.pyi +575 -0
- orcher_sdk-0.4.0/src/orcher/actor/__init__.py +52 -0
- orcher_sdk-0.4.0/src/orcher/actor/client.py +125 -0
- orcher_sdk-0.4.0/src/orcher/actor/context.py +142 -0
- orcher_sdk-0.4.0/src/orcher/actor/state/__init__.py +16 -0
- orcher_sdk-0.4.0/src/orcher/actor/state/client.py +182 -0
- orcher_sdk-0.4.0/src/orcher/actor/state/manager.py +123 -0
- orcher_sdk-0.4.0/src/orcher/actor/state/mock.py +41 -0
- orcher_sdk-0.4.0/src/orcher/actor/types.py +92 -0
- orcher_sdk-0.4.0/src/orcher/client/__init__.py +28 -0
- orcher_sdk-0.4.0/src/orcher/client/client.py +359 -0
- orcher_sdk-0.4.0/src/orcher/client/config.py +53 -0
- orcher_sdk-0.4.0/src/orcher/client/workflow_handle.py +257 -0
- orcher_sdk-0.4.0/src/orcher/codec/__init__.py +32 -0
- orcher_sdk-0.4.0/src/orcher/converter/__init__.py +97 -0
- orcher_sdk-0.4.0/src/orcher/converter/base.py +164 -0
- orcher_sdk-0.4.0/src/orcher/converter/json.py +377 -0
- orcher_sdk-0.4.0/src/orcher/converter/payload.py +399 -0
- orcher_sdk-0.4.0/src/orcher/core/__init__.py +35 -0
- orcher_sdk-0.4.0/src/orcher/core/bridge.py +147 -0
- orcher_sdk-0.4.0/src/orcher/core/native.py +125 -0
- orcher_sdk-0.4.0/src/orcher/decorators/__init__.py +55 -0
- orcher_sdk-0.4.0/src/orcher/decorators/actor.py +141 -0
- orcher_sdk-0.4.0/src/orcher/decorators/query.py +117 -0
- orcher_sdk-0.4.0/src/orcher/decorators/registry.py +520 -0
- orcher_sdk-0.4.0/src/orcher/decorators/task.py +164 -0
- orcher_sdk-0.4.0/src/orcher/decorators/task_class.py +116 -0
- orcher_sdk-0.4.0/src/orcher/decorators/update.py +125 -0
- orcher_sdk-0.4.0/src/orcher/decorators/workflow.py +165 -0
- orcher_sdk-0.4.0/src/orcher/errors/__init__.py +68 -0
- orcher_sdk-0.4.0/src/orcher/errors/_translate.py +124 -0
- orcher_sdk-0.4.0/src/orcher/errors/base.py +84 -0
- orcher_sdk-0.4.0/src/orcher/errors/client.py +38 -0
- orcher_sdk-0.4.0/src/orcher/errors/codes.py +63 -0
- orcher_sdk-0.4.0/src/orcher/errors/context.py +360 -0
- orcher_sdk-0.4.0/src/orcher/errors/failure.py +507 -0
- orcher_sdk-0.4.0/src/orcher/errors/service.py +27 -0
- orcher_sdk-0.4.0/src/orcher/errors/task.py +81 -0
- orcher_sdk-0.4.0/src/orcher/errors/workflow.py +130 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/__init__.py +66 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/base.py +267 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/builtin/__init__.py +36 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/builtin/logging.py +203 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/builtin/metrics.py +367 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/builtin/tracing.py +344 -0
- orcher_sdk-0.4.0/src/orcher/interceptors/chain.py +224 -0
- orcher_sdk-0.4.0/src/orcher/py.typed +0 -0
- orcher_sdk-0.4.0/src/orcher/task/__init__.py +37 -0
- orcher_sdk-0.4.0/src/orcher/task/cancellation.py +72 -0
- orcher_sdk-0.4.0/src/orcher/task/context.py +192 -0
- orcher_sdk-0.4.0/src/orcher/task/execution.py +185 -0
- orcher_sdk-0.4.0/src/orcher/task/info.py +46 -0
- orcher_sdk-0.4.0/src/orcher/task/reference.py +102 -0
- orcher_sdk-0.4.0/src/orcher/testing/__init__.py +78 -0
- orcher_sdk-0.4.0/src/orcher/testing/builders.py +516 -0
- orcher_sdk-0.4.0/src/orcher/testing/environment.py +767 -0
- orcher_sdk-0.4.0/src/orcher/testing/mocks.py +517 -0
- orcher_sdk-0.4.0/src/orcher/testing/time_controller.py +266 -0
- orcher_sdk-0.4.0/src/orcher/testing/types.py +245 -0
- orcher_sdk-0.4.0/src/orcher/types/__init__.py +441 -0
- orcher_sdk-0.4.0/src/orcher/worker/__init__.py +99 -0
- orcher_sdk-0.4.0/src/orcher/worker/builder.py +610 -0
- orcher_sdk-0.4.0/src/orcher/worker/config.py +218 -0
- orcher_sdk-0.4.0/src/orcher/worker/execution_pool.py +455 -0
- orcher_sdk-0.4.0/src/orcher/worker/executor.py +424 -0
- orcher_sdk-0.4.0/src/orcher/worker/poller.py +339 -0
- orcher_sdk-0.4.0/src/orcher/worker/session.py +159 -0
- orcher_sdk-0.4.0/src/orcher/worker/worker.py +1981 -0
- orcher_sdk-0.4.0/src/orcher/workflow/__init__.py +110 -0
- orcher_sdk-0.4.0/src/orcher/workflow/child.py +85 -0
- orcher_sdk-0.4.0/src/orcher/workflow/commands.py +301 -0
- orcher_sdk-0.4.0/src/orcher/workflow/context.py +1360 -0
- orcher_sdk-0.4.0/src/orcher/workflow/events.py +271 -0
- orcher_sdk-0.4.0/src/orcher/workflow/execution.py +126 -0
- orcher_sdk-0.4.0/src/orcher/workflow/info.py +37 -0
- orcher_sdk-0.4.0/src/orcher/workflow/queries.py +222 -0
- orcher_sdk-0.4.0/src/orcher/workflow/random.py +62 -0
- orcher_sdk-0.4.0/src/orcher/workflow/saga.py +175 -0
- orcher_sdk-0.4.0/src/orcher/workflow/sentinels.py +14 -0
- orcher_sdk-0.4.0/src/orcher/workflow/session.py +213 -0
- orcher_sdk-0.4.0/src/orcher/workflow/time.py +71 -0
- orcher_sdk-0.4.0/tests/__init__.py +1 -0
- orcher_sdk-0.4.0/tests/support/__init__.py +0 -0
- orcher_sdk-0.4.0/tests/support/fake_engine.py +290 -0
- orcher_sdk-0.4.0/tests/test_bridge_call_signatures.py +51 -0
- orcher_sdk-0.4.0/tests/test_child_handles.py +133 -0
- orcher_sdk-0.4.0/tests/test_client.py +279 -0
- orcher_sdk-0.4.0/tests/test_closures_journal_and_replay.py +107 -0
- orcher_sdk-0.4.0/tests/test_context.py +411 -0
- orcher_sdk-0.4.0/tests/test_converter.py +591 -0
- orcher_sdk-0.4.0/tests/test_decorators.py +366 -0
- orcher_sdk-0.4.0/tests/test_errors.py +599 -0
- orcher_sdk-0.4.0/tests/test_handle_raises_documented_errors.py +114 -0
- orcher_sdk-0.4.0/tests/test_integration.py +412 -0
- orcher_sdk-0.4.0/tests/test_interceptors.py +1213 -0
- orcher_sdk-0.4.0/tests/test_interceptors_run.py +149 -0
- orcher_sdk-0.4.0/tests/test_random_is_stable_across_processes.py +66 -0
- orcher_sdk-0.4.0/tests/test_replay_step_ids.py +89 -0
- orcher_sdk-0.4.0/tests/test_retry_policy.py +130 -0
- orcher_sdk-0.4.0/tests/test_service.py +654 -0
- orcher_sdk-0.4.0/tests/test_silent_no_ops.py +69 -0
- orcher_sdk-0.4.0/tests/test_small_defects.py +144 -0
- orcher_sdk-0.4.0/tests/test_smoke.py +64 -0
- orcher_sdk-0.4.0/tests/test_status_is_the_documented_enum.py +70 -0
- orcher_sdk-0.4.0/tests/test_task_duration_encoding.py +39 -0
- orcher_sdk-0.4.0/tests/test_task_failure_type.py +62 -0
- orcher_sdk-0.4.0/tests/test_task_heartbeat.py +56 -0
- orcher_sdk-0.4.0/tests/test_testing.py +689 -0
- orcher_sdk-0.4.0/tests/test_types.py +164 -0
- orcher_sdk-0.4.0/tests/test_vocabulary.py +50 -0
- orcher_sdk-0.4.0/tests/test_wait_for_event_timeout.py +127 -0
- orcher_sdk-0.4.0/tests/test_worker_api_key.py +136 -0
- orcher_sdk-0.4.0/tests/test_worker_builder_durations.py +45 -0
- orcher_sdk-0.4.0/tests/test_worker_version_id.py +83 -0
- orcher_sdk-0.4.0/tests/test_workflow_failure_type.py +19 -0
- orcher_sdk-0.4.0/tests/test_workflow_time.py +121 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Changelog
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in the Orcher Python SDK. Bug reports, fixes and
|
|
4
|
+
improvements are welcome.
|
|
5
|
+
|
|
6
|
+
## Reporting a problem
|
|
7
|
+
|
|
8
|
+
Open an issue with the SDK version, your Python version, what you ran, and
|
|
9
|
+
what happened. A short script that reproduces the problem helps the most.
|
|
10
|
+
|
|
11
|
+
## Development setup
|
|
12
|
+
|
|
13
|
+
You need Python 3.11 or later and a stable Rust toolchain.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m venv .venv
|
|
17
|
+
source .venv/bin/activate
|
|
18
|
+
pip install "maturin>=1.4,<2.0"
|
|
19
|
+
maturin develop --extras dev # builds the native extension into the venv
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Rerun `maturin develop` after changing anything under `native/`.
|
|
23
|
+
|
|
24
|
+
To build against local checkouts of `sdk-core` and `protos` instead of the
|
|
25
|
+
crates.io releases in `Cargo.toml`, copy `.cargo/config.example.toml` to
|
|
26
|
+
`.cargo/config.toml`.
|
|
27
|
+
|
|
28
|
+
## Checks
|
|
29
|
+
|
|
30
|
+
Pull requests must pass the same checks CI runs:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
ruff check .
|
|
34
|
+
python -m pytest -rs
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Unit tests do not need an engine. The suite in `contract/` does: it runs a
|
|
38
|
+
real worker against a running engine and checks the durable behavior end to
|
|
39
|
+
end. Run it for changes to the worker, the workflow context or the native
|
|
40
|
+
extension. See [contract/README.md](contract/README.md).
|
|
41
|
+
|
|
42
|
+
## Pull requests
|
|
43
|
+
|
|
44
|
+
- Keep each pull request to one change, with tests for new behavior and for
|
|
45
|
+
bugs you fix.
|
|
46
|
+
- Write commit messages as [Conventional Commits](https://www.conventionalcommits.org)
|
|
47
|
+
(`feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `ci:`, `chore:`). Releases
|
|
48
|
+
and the changelog are generated from them.
|
|
49
|
+
- Update docstrings and the README when you change public behavior.
|
|
50
|
+
|
|
51
|
+
## License
|
|
52
|
+
|
|
53
|
+
By contributing, you agree that your contributions are licensed under the
|
|
54
|
+
Apache License 2.0, the license of this project.
|