durabletask-dapr 0.2.0a16__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.
- durabletask_dapr-0.2.0a16/.github/workflows/pr-validation.yml +73 -0
- durabletask_dapr-0.2.0a16/.gitignore +134 -0
- durabletask_dapr-0.2.0a16/.vscode/launch.json +22 -0
- durabletask_dapr-0.2.0a16/.vscode/settings.json +34 -0
- durabletask_dapr-0.2.0a16/CHANGELOG.md +86 -0
- durabletask_dapr-0.2.0a16/CODEOWNERS +2 -0
- durabletask_dapr-0.2.0a16/CODE_OF_CONDUCT.md +9 -0
- durabletask_dapr-0.2.0a16/LICENSE +21 -0
- durabletask_dapr-0.2.0a16/Makefile +28 -0
- durabletask_dapr-0.2.0a16/PKG-INFO +392 -0
- durabletask_dapr-0.2.0a16/README.md +345 -0
- durabletask_dapr-0.2.0a16/SECURITY.md +41 -0
- durabletask_dapr-0.2.0a16/SUPPORT.md +25 -0
- durabletask_dapr-0.2.0a16/dev-requirements.txt +1 -0
- durabletask_dapr-0.2.0a16/durabletask/__init__.py +6 -0
- durabletask_dapr-0.2.0a16/durabletask/aio/__init__.py +5 -0
- durabletask_dapr-0.2.0a16/durabletask/aio/client.py +196 -0
- durabletask_dapr-0.2.0a16/durabletask/aio/internal/__init__.py +0 -0
- durabletask_dapr-0.2.0a16/durabletask/aio/internal/grpc_interceptor.py +67 -0
- durabletask_dapr-0.2.0a16/durabletask/aio/internal/shared.py +62 -0
- durabletask_dapr-0.2.0a16/durabletask/client.py +281 -0
- durabletask_dapr-0.2.0a16/durabletask/deterministic.py +224 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/PROTO_SOURCE_COMMIT_HASH +1 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/grpc_interceptor.py +75 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/helpers.py +255 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/orchestrator_service_pb2.py +293 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/orchestrator_service_pb2.pyi +1241 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/orchestrator_service_pb2_grpc.py +1325 -0
- durabletask_dapr-0.2.0a16/durabletask/internal/shared.py +160 -0
- durabletask_dapr-0.2.0a16/durabletask/task.py +625 -0
- durabletask_dapr-0.2.0a16/durabletask/worker.py +1907 -0
- durabletask_dapr-0.2.0a16/durabletask_dapr.egg-info/PKG-INFO +392 -0
- durabletask_dapr-0.2.0a16/durabletask_dapr.egg-info/SOURCES.txt +57 -0
- durabletask_dapr-0.2.0a16/durabletask_dapr.egg-info/dependency_links.txt +1 -0
- durabletask_dapr-0.2.0a16/durabletask_dapr.egg-info/requires.txt +11 -0
- durabletask_dapr-0.2.0a16/durabletask_dapr.egg-info/top_level.txt +1 -0
- durabletask_dapr-0.2.0a16/examples/README.md +31 -0
- durabletask_dapr-0.2.0a16/examples/activity_sequence.py +36 -0
- durabletask_dapr-0.2.0a16/examples/fanout_fanin.py +63 -0
- durabletask_dapr-0.2.0a16/examples/human_interaction.py +100 -0
- durabletask_dapr-0.2.0a16/pyproject.toml +84 -0
- durabletask_dapr-0.2.0a16/requirements.txt +1 -0
- durabletask_dapr-0.2.0a16/setup.cfg +4 -0
- durabletask_dapr-0.2.0a16/tests/__init__.py +0 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_activity_executor.py +58 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_client.py +167 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_client_async.py +171 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_concurrency_options.py +92 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_deterministic.py +455 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_orchestration_e2e.py +775 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_orchestration_e2e_async.py +483 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_orchestration_executor.py +1711 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_orchestration_wait.py +69 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_registry.py +205 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_serialization.py +87 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_task.py +115 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_worker_concurrency_loop.py +149 -0
- durabletask_dapr-0.2.0a16/tests/durabletask/test_worker_concurrency_loop_async.py +88 -0
- durabletask_dapr-0.2.0a16/tox.ini +32 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Build Validation
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
tags: ["v*"]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ "main" ]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: |
|
|
30
|
+
python -m pip install --upgrade pip
|
|
31
|
+
pip install .[dev]
|
|
32
|
+
- name: Lint with ruff
|
|
33
|
+
run: |
|
|
34
|
+
ruff check
|
|
35
|
+
- name: Pytest unit tests
|
|
36
|
+
run: |
|
|
37
|
+
tox -e py${{ matrix.python-version }}
|
|
38
|
+
# Sidecar for running e2e tests requires Go SDK
|
|
39
|
+
- name: Install Go SDK
|
|
40
|
+
uses: actions/setup-go@v5
|
|
41
|
+
with:
|
|
42
|
+
go-version: 'stable'
|
|
43
|
+
# Install and run the durabletask-go sidecar for running e2e tests
|
|
44
|
+
- name: Pytest e2e tests
|
|
45
|
+
run: |
|
|
46
|
+
# TODO: use dapr run instead of durabletask-go as it provides a more reliable sidecar behaviorfor e2e tests
|
|
47
|
+
go install github.com/dapr/durabletask-go@main
|
|
48
|
+
durabletask-go --port 4001 &
|
|
49
|
+
tox -e py${{ matrix.python-version }}-e2e
|
|
50
|
+
publish:
|
|
51
|
+
needs: build
|
|
52
|
+
if: startswith(github.ref, 'refs/tags/v')
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
env:
|
|
55
|
+
TWINE_USERNAME: "__token__"
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
with:
|
|
59
|
+
fetch-depth: 0
|
|
60
|
+
- name: Set up Python 3.11
|
|
61
|
+
uses: actions/setup-python@v5
|
|
62
|
+
with:
|
|
63
|
+
python-version: 3.11
|
|
64
|
+
- name: Install dependencies
|
|
65
|
+
run: |
|
|
66
|
+
python -m pip install --upgrade pip
|
|
67
|
+
pip install setuptools wheel twine build
|
|
68
|
+
- name: Build and publish Dapr Python SDK
|
|
69
|
+
env:
|
|
70
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_PASS }}
|
|
71
|
+
run: |
|
|
72
|
+
python -m build
|
|
73
|
+
twine upload dist/*
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
130
|
+
|
|
131
|
+
# IDEs
|
|
132
|
+
.idea
|
|
133
|
+
|
|
134
|
+
coverage.lcov
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Python: Debug Tests",
|
|
6
|
+
"type": "python",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"program": "${file}",
|
|
9
|
+
"cwd": "${fileDirname}",
|
|
10
|
+
"purpose": [
|
|
11
|
+
"debug-test"
|
|
12
|
+
],
|
|
13
|
+
"env": {
|
|
14
|
+
// pytest-cov breaks debugging, so we have to disable it during debug sessions
|
|
15
|
+
"PYTEST_ADDOPTS": "--no-cov",
|
|
16
|
+
"PYTHONPATH": "${workspaceFolder}"
|
|
17
|
+
},
|
|
18
|
+
"console": "integratedTerminal",
|
|
19
|
+
"justMyCode": false
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"[python]": {
|
|
3
|
+
"editor.defaultFormatter": "ms-python.autopep8",
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.organizeImports": "explicit"
|
|
7
|
+
},
|
|
8
|
+
"editor.rulers": [
|
|
9
|
+
119
|
|
10
|
+
],
|
|
11
|
+
},
|
|
12
|
+
"autopep8.args": [
|
|
13
|
+
"--max-line-length=119"
|
|
14
|
+
],
|
|
15
|
+
"python.analysis.typeCheckingMode": "basic",
|
|
16
|
+
"python.testing.pytestArgs": [
|
|
17
|
+
"-v",
|
|
18
|
+
"--cov=durabletask/",
|
|
19
|
+
"--cov-report=lcov",
|
|
20
|
+
"tests/"
|
|
21
|
+
],
|
|
22
|
+
"python.testing.unittestEnabled": false,
|
|
23
|
+
"python.testing.pytestEnabled": true,
|
|
24
|
+
"coverage-gutters.showLineCoverage": true,
|
|
25
|
+
"coverage-gutters.coverageFileNames": [
|
|
26
|
+
"coverage.lcov",
|
|
27
|
+
"lcov.info",
|
|
28
|
+
"cov.xml",
|
|
29
|
+
"coverage.xml",
|
|
30
|
+
"jacoco.xml",
|
|
31
|
+
"coverage.cobertura.xml"
|
|
32
|
+
],
|
|
33
|
+
"makefile.configureOnOpen": false
|
|
34
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## v0.3.0
|
|
9
|
+
|
|
10
|
+
### New
|
|
11
|
+
|
|
12
|
+
- Added `ConcurrencyOptions` class for fine-grained concurrency control with separate limits for activities and orchestrations. The thread pool worker count can also be configured.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Fixed an issue where a worker could not recover after its connection was interrupted or severed
|
|
17
|
+
|
|
18
|
+
## v0.2.1
|
|
19
|
+
|
|
20
|
+
### New
|
|
21
|
+
|
|
22
|
+
- Added `set_custom_status` orchestrator API ([#31](https://github.com/microsoft/durabletask-python/pull/31)) - contributed by [@famarting](https://github.com/famarting)
|
|
23
|
+
- Added `purge_orchestration` client API ([#34](https://github.com/microsoft/durabletask-python/pull/34)) - contributed by [@famarting](https://github.com/famarting)
|
|
24
|
+
|
|
25
|
+
### Changes
|
|
26
|
+
|
|
27
|
+
- Protos are compiled with gRPC 1.62.3 / protobuf 3.25.X instead of the latest release. This ensures compatibility with a wider range of grpcio versions for better compatibility with other packages / libraries ([#36](https://github.com/microsoft/durabletask-python/pull/36)) - by [@berndverst](https://github.com/berndverst)
|
|
28
|
+
- Http and grpc protocols and their secure variants are stripped from the host name parameter if provided. Secure mode is enabled if the protocol provided is https or grpcs ([#38](https://github.com/microsoft/durabletask-python/pull/38) - by [@berndverst)(https://github.com/berndverst)
|
|
29
|
+
- Improve ProtoGen by downloading proto file directly instead of using submodule ([#39](https://github.com/microsoft/durabletask-python/pull/39) - by [@berndverst](https://github.com/berndverst)
|
|
30
|
+
|
|
31
|
+
### Updates
|
|
32
|
+
|
|
33
|
+
- Updated `durabletask-protobuf` submodule reference to latest
|
|
34
|
+
|
|
35
|
+
## v0.1.1a1
|
|
36
|
+
|
|
37
|
+
### New
|
|
38
|
+
|
|
39
|
+
- Add recursive flag in terminate_orchestration to support cascade terminate ([#27](https://github.com/microsoft/durabletask-python/pull/27)) - contributed by [@shivamkm07](https://github.com/shivamkm07)
|
|
40
|
+
|
|
41
|
+
## v0.1.0
|
|
42
|
+
|
|
43
|
+
### New
|
|
44
|
+
|
|
45
|
+
- Retry policies for activities and sub-orchestrations ([#11](https://github.com/microsoft/durabletask-python/pull/11)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- Fix try/except in orchestrator functions not being handled correctly ([#21](https://github.com/microsoft/durabletask-python/pull/21)) - by [@cgillum](https://github.com/cgillum)
|
|
50
|
+
- Updated `durabletask-protobuf` submodule reference to latest distributed tracing commit - by [@cgillum](https://github.com/cgillum)
|
|
51
|
+
|
|
52
|
+
## v0.1.0a5
|
|
53
|
+
|
|
54
|
+
### New
|
|
55
|
+
|
|
56
|
+
- Adds support for secure channels ([#18](https://github.com/microsoft/durabletask-python/pull/18)) - contributed by [@elena-kolevska](https://github.com/elena-kolevska)
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- Fix zero argument values sent to activities as None ([#13](https://github.com/microsoft/durabletask-python/pull/13)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)
|
|
61
|
+
|
|
62
|
+
## v0.1.0a3
|
|
63
|
+
|
|
64
|
+
### New
|
|
65
|
+
|
|
66
|
+
- Add gRPC metadata option ([#16](https://github.com/microsoft/durabletask-python/pull/16)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)
|
|
67
|
+
|
|
68
|
+
### Changes
|
|
69
|
+
|
|
70
|
+
- Removed Python 3.7 support due to EOL ([#14](https://github.com/microsoft/durabletask-python/pull/14)) - contributed by [@berndverst](https://github.com/berndverst)
|
|
71
|
+
|
|
72
|
+
## v0.1.0a2
|
|
73
|
+
|
|
74
|
+
### New
|
|
75
|
+
|
|
76
|
+
- Continue-as-new ([#9](https://github.com/microsoft/durabletask-python/pull/9))
|
|
77
|
+
- Support for Python 3.7+ ([#10](https://github.com/microsoft/durabletask-python/pull/10)) - contributed by [@DeepanshuA](https://github.com/DeepanshuA)
|
|
78
|
+
|
|
79
|
+
## v0.1.0a1
|
|
80
|
+
|
|
81
|
+
Initial release, which includes the following features:
|
|
82
|
+
|
|
83
|
+
- Orchestrations and activities
|
|
84
|
+
- Durable timers
|
|
85
|
+
- Sub-orchestrations
|
|
86
|
+
- Suspend, resume, and terminate client operations
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Microsoft Open Source Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
4
|
+
|
|
5
|
+
Resources:
|
|
6
|
+
|
|
7
|
+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
|
|
8
|
+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
|
|
9
|
+
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
init:
|
|
2
|
+
pip3 install -r requirements.txt
|
|
3
|
+
|
|
4
|
+
test-unit:
|
|
5
|
+
pytest -m "not e2e" --verbose
|
|
6
|
+
|
|
7
|
+
test-e2e:
|
|
8
|
+
pytest -m e2e --verbose
|
|
9
|
+
|
|
10
|
+
coverage-clean:
|
|
11
|
+
rm -f .coverage .coverage.* coverage.xml
|
|
12
|
+
|
|
13
|
+
coverage-all: coverage-clean
|
|
14
|
+
pytest -m "not e2e" --durations=0 --cov=durabletask --cov-branch --cov-report=term-missing --cov-report=xml
|
|
15
|
+
pytest -m e2e --durations=0 --cov=durabletask --cov-branch --cov-report=term-missing --cov-report=xml --cov-append
|
|
16
|
+
|
|
17
|
+
install:
|
|
18
|
+
python3 -m pip install .
|
|
19
|
+
|
|
20
|
+
gen-proto:
|
|
21
|
+
curl -o durabletask/internal/orchestrator_service.proto https://raw.githubusercontent.com/dapr/durabletask-protobuf/refs/heads/main/protos/orchestrator_service.proto
|
|
22
|
+
curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/dapr/durabletask-protobuf/commits?path=protos/orchestrator_service.proto&sha=main&per_page=1" | jq -r '.[0].sha' > durabletask/internal/PROTO_SOURCE_COMMIT_HASH
|
|
23
|
+
# NOTE: remember to check/update pyproject.toml protobuf version to follow https://github.com/grpc/grpc/blob/v{{VERSION GRPC IO TOOL BELLOW}}/tools/distrib/python/grpcio_tools/setup.py
|
|
24
|
+
pip install .[dev]
|
|
25
|
+
python3 -m grpc_tools.protoc --proto_path=. --python_out=. --pyi_out=. --grpc_python_out=. ./durabletask/internal/orchestrator_service.proto
|
|
26
|
+
rm durabletask/internal/*.proto
|
|
27
|
+
|
|
28
|
+
.PHONY: init test-unit test-e2e coverage-clean coverage-all gen-proto install
|