datashare-python 0.12.2__tar.gz → 0.12.3__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.
Files changed (29) hide show
  1. {datashare_python-0.12.2 → datashare_python-0.12.3}/PKG-INFO +1 -1
  2. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/config.py +5 -5
  3. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/conftest.py +1 -1
  4. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/objects.py +1 -1
  5. datashare_python-0.12.3/datashare_python/worker-template.tar.gz +0 -0
  6. {datashare_python-0.12.2 → datashare_python-0.12.3}/pyproject.toml +1 -1
  7. datashare_python-0.12.2/datashare_python/worker-template.tar.gz +0 -0
  8. {datashare_python-0.12.2 → datashare_python-0.12.3}/.gitignore +0 -0
  9. {datashare_python-0.12.2 → datashare_python-0.12.3}/README.md +0 -0
  10. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/.gitignore +0 -0
  11. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/__init__.py +0 -0
  12. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/__main__.py +0 -0
  13. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/cli/__init__.py +0 -0
  14. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/cli/project.py +0 -0
  15. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/cli/task.py +0 -0
  16. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/cli/utils.py +0 -0
  17. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/cli/worker.py +0 -0
  18. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/constants.py +0 -0
  19. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/dependencies.py +0 -0
  20. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/discovery.py +0 -0
  21. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/exceptions.py +0 -0
  22. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/interceptors.py +0 -0
  23. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/logging_.py +0 -0
  24. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/mimetypes_.py +0 -0
  25. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/task_client.py +0 -0
  26. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/template.py +0 -0
  27. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/types_.py +0 -0
  28. {datashare_python-0.12.2 → datashare_python-0.12.3}/datashare_python/utils.py +0 -0
  29. {datashare_python-0.12.2 → datashare_python-0.12.3}/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.2
3
+ Version: 0.12.3
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/
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Literal
4
4
 
5
5
  from icij_common.es import ESClient
6
6
  from icij_common.pydantic_utils import ICIJSettings
7
- from pydantic import PrivateAttr
7
+ from pydantic import Field, PrivateAttr
8
8
  from pydantic_settings import SettingsConfigDict
9
9
  from temporalio.runtime import PrometheusConfig, Runtime, TelemetryConfig
10
10
 
@@ -61,7 +61,7 @@ class DatashareClientConfig(BaseModel):
61
61
  class TemporalClientConfig(BaseModel):
62
62
  host: str = "temporal:7233"
63
63
  namespace: str = "datashare-default"
64
- prometheus_host: str | None = None
64
+ prometheus_address: str | None = Field(alias="prometheus_host", default=None)
65
65
 
66
66
  _client: TemporalClient | None = PrivateAttr(default=None)
67
67
 
@@ -70,9 +70,9 @@ class TemporalClientConfig(BaseModel):
70
70
 
71
71
  if self._client is None:
72
72
  runtime = None
73
- if self.prometheus_host is not None:
73
+ if self.prometheus_address is not None:
74
74
  telemetry_config = TelemetryConfig(
75
- metrics=PrometheusConfig(bind_address="0.0.0.0:9000")
75
+ metrics=PrometheusConfig(bind_address=self.prometheus_address)
76
76
  )
77
77
  runtime = Runtime(telemetry=telemetry_config)
78
78
 
@@ -145,5 +145,5 @@ class WorkerConfig(ICIJSettings, BaseModel):
145
145
 
146
146
 
147
147
  class ActivityTimeouts(BaseModel):
148
- start_to_close: timedelta | None = None
148
+ start_to_close: timedelta = timedelta(minutes=10)
149
149
  heartbeat: timedelta = timedelta(minutes=1)
@@ -430,7 +430,7 @@ def _run_worker_process(
430
430
  runtime = Runtime(telemetry=TelemetryConfig())
431
431
  # We don't use config.to_temporal_client since we get a problem with the
432
432
  # temporal runtime not being properly recreated, we create it explicitely
433
- if temporal_config.prometheus_host is not None:
433
+ if temporal_config.prometheus_address is not None:
434
434
  telemetry_config = TelemetryConfig(
435
435
  metrics=PrometheusConfig(bind_address="0.0.0.0:9000")
436
436
  )
@@ -718,7 +718,7 @@ class ErrorReportWithPages(ProcessingReportWithPages, ABC):
718
718
  return ErrorReportWithPages(
719
719
  n_docs=other.n_docs + self.n_docs,
720
720
  n_pages=other.n_pages + self.n_pages,
721
- errors=self.errors + other.errors,
721
+ errors=other.errors + self.errors,
722
722
  )
723
723
 
724
724
  @classmethod
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "datashare-python"
3
- version = "0.12.2"
3
+ version = "0.12.3"
4
4
  description = "Manage Python tasks and local resources in Datashare"
5
5
  authors = [
6
6
  { name = "Clément Doumouro", email = "cdoumouro@icij.org" },