datashare-python 0.12.3__tar.gz → 0.12.5__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.
- {datashare_python-0.12.3 → datashare_python-0.12.5}/PKG-INFO +1 -1
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/config.py +16 -3
- datashare_python-0.12.5/datashare_python/worker-template.tar.gz +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/pyproject.toml +1 -1
- datashare_python-0.12.3/datashare_python/worker-template.tar.gz +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/.gitignore +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/README.md +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/.gitignore +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/__init__.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/__main__.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/cli/__init__.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/cli/project.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/cli/task.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/cli/utils.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/cli/worker.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/conftest.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/constants.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/dependencies.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/discovery.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/exceptions.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/interceptors.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/logging_.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/mimetypes_.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/objects.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/task_client.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/template.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/types_.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/utils.py +0 -0
- {datashare_python-0.12.3 → datashare_python-0.12.5}/datashare_python/worker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: datashare-python
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.5
|
|
4
4
|
Summary: Manage Python tasks and local resources in Datashare
|
|
5
5
|
Project-URL: Homepage, https://icij.github.io/datashare-python/
|
|
6
6
|
Project-URL: Documentation, https://icij.github.io/datashare-python/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from datetime import timedelta
|
|
2
2
|
from enum import StrEnum
|
|
3
|
-
from typing import TYPE_CHECKING, Literal
|
|
3
|
+
from typing import TYPE_CHECKING, Any, Literal
|
|
4
4
|
|
|
5
5
|
from icij_common.es import ESClient
|
|
6
6
|
from icij_common.pydantic_utils import ICIJSettings
|
|
7
|
-
from pydantic import
|
|
7
|
+
from pydantic import PrivateAttr, model_validator
|
|
8
8
|
from pydantic_settings import SettingsConfigDict
|
|
9
9
|
from temporalio.runtime import PrometheusConfig, Runtime, TelemetryConfig
|
|
10
10
|
|
|
@@ -61,10 +61,23 @@ class DatashareClientConfig(BaseModel):
|
|
|
61
61
|
class TemporalClientConfig(BaseModel):
|
|
62
62
|
host: str = "temporal:7233"
|
|
63
63
|
namespace: str = "datashare-default"
|
|
64
|
-
prometheus_address: str | None =
|
|
64
|
+
prometheus_address: str | None = None
|
|
65
65
|
|
|
66
66
|
_client: TemporalClient | None = PrivateAttr(default=None)
|
|
67
67
|
|
|
68
|
+
@model_validator(mode="before")
|
|
69
|
+
@classmethod
|
|
70
|
+
def _prometheus_host_backward_compatibility(cls, v: Any) -> Any:
|
|
71
|
+
# the combination of nested_model_default_partial_update=True in the
|
|
72
|
+
# WorkerConfig with extra="forbid" makes alias fail when loading from envvars.
|
|
73
|
+
# We can't use field aliases...
|
|
74
|
+
if not isinstance(v, dict):
|
|
75
|
+
return v
|
|
76
|
+
prometheus_address = v.pop("prometheus_host", v.pop("PROMETHEUS_HOST", None))
|
|
77
|
+
if prometheus_address is not None:
|
|
78
|
+
v["prometheus_address"] = prometheus_address
|
|
79
|
+
return v
|
|
80
|
+
|
|
68
81
|
async def to_client(self) -> TemporalClient:
|
|
69
82
|
from .utils import PYDANTIC_DATA_CONVERTER # noqa: PLC0415
|
|
70
83
|
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|