Skip to content

Commit 34bb050

Browse files
authored
Environment configuration (#895)
* Implementation of environment configuration for Python SDK * pyright lint exclusion * simplify DataSource to union type, read file using Path, add experimental to class docstrings, misc * Remove .DS_Store files from Git tracking * fix bridge after pyo3 upgrade * handle windows file paths * quick pr suggestions * add Path to DataSource to read file paths, read file contents via string * add ClientConnectConfig and to_client_connect_config * added load_client_connect_config * raise TypeError when reading invalid data source * load_client_connect_config rename env_vars to override_env_vars * add .connect calls to test_load_client_connect_config to ensure load_client_connect_config actually matches connect arguments * refactor to general 'load' methods * add to_dict methods * formatting + linting * class rename, some cleanup with type casting
1 parent 56023fa commit 34bb050

File tree

8 files changed

+1418
-15
lines changed

8 files changed

+1418
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ temporalio/bridge/temporal_sdk_bridge*
99
/.idea
1010
/sdk-python.iml
1111
/.zed
12+
*.DS_Store

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ exclude = [
186186
"temporalio/bridge/metric.py",
187187
"temporalio/bridge/runtime.py",
188188
"temporalio/bridge/testing.py",
189+
"temporalio/envconfig.py",
189190
]
190191

191192
[tool.ruff]

temporalio/bridge/Cargo.lock

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

temporalio/bridge/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pyo3-async-runtimes = { version = "0.25", features = ["tokio-runtime"] }
2626
pythonize = "0.25"
2727
temporal-client = { version = "0.1.0", path = "./sdk-core/client" }
2828
temporal-sdk-core = { version = "0.1.0", path = "./sdk-core/core", features = ["ephemeral-server"] }
29-
temporal-sdk-core-api = { version = "0.1.0", path = "./sdk-core/core-api" }
29+
temporal-sdk-core-api = { version = "0.1.0", path = "./sdk-core/core-api", features = ["envconfig"] }
3030
temporal-sdk-core-protos = { version = "0.1.0", path = "./sdk-core/sdk-core-protos" }
3131
tokio = "1.26"
3232
tokio-stream = "0.1"

0 commit comments

Comments
 (0)