Skip to content

Commit f0a3e39

Browse files
committed
Merge remote-tracking branch 'origin/main' into andystaples/add-custom-type-serialization
# Conflicts: # durabletask/internal/entity_state_shim.py # examples/human_interaction.py # examples/in_memory_backend_example/src/workflows.py
2 parents 70bcb0d + c115409 commit f0a3e39

65 files changed

Lines changed: 314 additions & 73 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,21 @@ Examples:
3636
- Follow PEP 8 conventions.
3737
- Use `autopep8` for Python formatting.
3838

39+
## Copyright Headers
40+
41+
Every new Python (`.py`) source file MUST begin with the following copyright
42+
header as the first two lines, followed by a blank line before any code,
43+
docstring, or imports:
44+
45+
```python
46+
# Copyright (c) Microsoft Corporation.
47+
# Licensed under the MIT License.
48+
```
49+
50+
This applies to all hand-written Python files, including `__init__.py` files,
51+
tests, and examples. The only exceptions are auto-generated protobuf files
52+
(`*_pb2.py` and `*_pb2_grpc.py`), which carry their own generated header.
53+
3954
## Python Type Checking
4055

4156
Before linting, check for and fix any Pylance errors in the files you

.github/workflows/typecheck.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,18 @@ jobs:
3030
run: |
3131
python -m pip install --upgrade pip
3232
pip install -r requirements.txt
33-
pip install -e ".[azure-blob-payloads,opentelemetry]"
34-
pip install -e ./durabletask-azuremanaged
33+
# Install third-party dependencies declared by the examples so they
34+
# type-check cleanly. Each example's requirements.txt is the single
35+
# source of truth for its dependencies.
36+
for req in examples/requirements.txt examples/*/requirements.txt; do
37+
pip install -r "$req"
38+
done
39+
# Install the packages under test from local source last (non-editable
40+
# so the durabletask / durabletask.azuremanaged namespace packages are
41+
# physically merged in site-packages, which pyright can resolve). This
42+
# overrides any PyPI copy pulled in by the example requirements above.
43+
pip install --force-reinstall --no-deps . ./durabletask-azuremanaged
44+
pip install ".[azure-blob-payloads,opentelemetry]"
3545
pip install pyright
3646
3747
- name: Run pyright (strict, Python 3.10)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.

durabletask/entities/durable_entity.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
from typing import Any, TypeVar, overload
25

36
from durabletask.entities.entity_context import EntityContext

durabletask/entities/entity_context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
13

24
from typing import TYPE_CHECKING, Any, TypeVar, overload
35
import uuid

durabletask/entities/entity_instance_id.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
class EntityInstanceId:
25
def __init__(self, entity: str, key: str):
36
EntityInstanceId.validate_entity_name(entity)

durabletask/entities/entity_lock.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
from __future__ import annotations
25

36
from typing import TYPE_CHECKING

durabletask/entities/entity_metadata.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
from datetime import datetime, timezone
25
from typing import TYPE_CHECKING, Any, TypeVar, overload
36
from durabletask.entities.entity_instance_id import EntityInstanceId

durabletask/entities/entity_operation_failed_exception.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
14
from durabletask.internal.orchestrator_service_pb2 import TaskFailureDetails
25
from durabletask.entities.entity_instance_id import EntityInstanceId
36

0 commit comments

Comments
 (0)