Skip to content

Commit acf12b1

Browse files
committed
Change to independent project
1 parent 2fb806e commit acf12b1

7 files changed

Lines changed: 836 additions & 153 deletions

File tree

lambda_worker/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ and uploads to AWS Lambda.
8181
Use the starter program to execute a Workflow on the Lambda worker, using
8282
the same config file the Lambda uses for connecting to the server:
8383

84+
From inside this directory:
85+
8486
```bash
85-
TEMPORAL_CONFIG_FILE=temporal.toml uv run python lambda_worker/starter.py
87+
TEMPORAL_CONFIG_FILE=temporal.toml uv run python starter.py
8688
```

lambda_worker/__init__.py

Whitespace-only changes.

lambda_worker/pyproject.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[project]
2+
name = "temporalio-samples-lambda-worker"
3+
version = "0.1a1"
4+
description = "Temporal.io Python SDK Lambda worker sample"
5+
authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }]
6+
requires-python = ">=3.10"
7+
readme = "README.md"
8+
license = "MIT"
9+
dependencies = ["temporalio[lambda-worker-otel]>=1.26.0,<2"]
10+
11+
[dependency-groups]
12+
dev = [
13+
"ruff>=0.5.0,<0.6",
14+
"mypy>=1.4.1,<2",
15+
"poethepoet>=0.36.0",
16+
]
17+
18+
[build-system]
19+
requires = ["hatchling"]
20+
build-backend = "hatchling.build"
21+
22+
[tool.hatch.metadata]
23+
allow-direct-references = true
24+
25+
[tool.hatch.build.targets.wheel]
26+
packages = ["."]
27+
28+
[tool.poe.tasks]
29+
format = [
30+
{ cmd = "uv run ruff check --select I --fix" },
31+
{ cmd = "uv run ruff format" },
32+
]
33+
lint = [
34+
{ cmd = "uv run ruff check --select I" },
35+
{ cmd = "uv run ruff format --check" },
36+
{ ref = "lint-types" },
37+
]
38+
lint-types = "uv run --all-groups mypy --check-untyped-defs --namespace-packages ."
39+
40+
[tool.ruff]
41+
target-version = "py310"

lambda_worker/starter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from temporalio.client import Client
44
from temporalio.envconfig import ClientConfig
55

6-
from lambda_worker.workflows import TASK_QUEUE, SampleWorkflow
6+
from workflows import TASK_QUEUE, SampleWorkflow
77

88

99
async def main() -> None:

lambda_worker/uv.lock

Lines changed: 643 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }]
66
requires-python = ">=3.10"
77
readme = "README.md"
88
license = "MIT"
9-
dependencies = ["temporalio>=1.26.0,<2"]
9+
dependencies = ["temporalio>=1.23.0,<2"]
1010

1111
[project.urls]
1212
Homepage = "https://github.com/temporalio/samples-python"
@@ -48,9 +48,6 @@ openai-agents = [
4848
pydantic-converter = ["pydantic>=2.10.6,<3"]
4949
sentry = ["sentry-sdk>=2.13.0"]
5050
trio-async = ["trio>=0.28.0,<0.29", "trio-asyncio>=0.15.0,<0.16"]
51-
lambda-worker = [
52-
"temporalio[lambda-worker-otel]",
53-
]
5451
cloud-export-to-parquet = [
5552
"pandas>=2.2.2,<3 ; python_version >= '3.10' and python_version < '4.0'",
5653
"numpy>=1.26.0,<2 ; python_version >= '3.10' and python_version < '3.13'",
@@ -63,9 +60,11 @@ allow-direct-references = true
6360

6461
[tool.hatch.build.targets.sdist]
6562
include = ["./**/*.py"]
63+
exclude = ["lambda_worker/**"]
6664

6765
[tool.hatch.build.targets.wheel]
6866
include = ["./**/*.py"]
67+
exclude = ["lambda_worker/**"]
6968
packages = [
7069
"activity_worker",
7170
"bedrock",
@@ -127,10 +126,12 @@ log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(linen
127126

128127
[tool.ruff]
129128
target-version = "py310"
129+
extend-exclude = ["lambda_worker"]
130130

131131
[tool.mypy]
132132
ignore_missing_imports = true
133133
namespace_packages = true
134+
exclude = ["lambda_worker/"]
134135

135136
[[tool.mypy.overrides]]
136137
module = "aiohttp.*"

uv.lock

Lines changed: 143 additions & 147 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)