datashare-python 0.2.26__tar.gz → 0.3.0__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 (28) hide show
  1. {datashare_python-0.2.26 → datashare_python-0.3.0}/PKG-INFO +1 -1
  2. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/cli/worker.py +5 -2
  3. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/objects.py +0 -8
  4. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/template.py +0 -1
  5. datashare_python-0.3.0/datashare_python/worker-template.tar.gz +0 -0
  6. {datashare_python-0.2.26 → datashare_python-0.3.0}/pyproject.toml +1 -1
  7. datashare_python-0.2.26/datashare_python/worker-template.tar.gz +0 -0
  8. {datashare_python-0.2.26 → datashare_python-0.3.0}/.gitignore +0 -0
  9. {datashare_python-0.2.26 → datashare_python-0.3.0}/README.md +0 -0
  10. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/.gitignore +0 -0
  11. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/__init__.py +0 -0
  12. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/__main__.py +0 -0
  13. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/cli/__init__.py +0 -0
  14. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/cli/local.py +0 -0
  15. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/cli/project.py +0 -0
  16. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/cli/task.py +0 -0
  17. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/cli/utils.py +0 -0
  18. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/config.py +0 -0
  19. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/conftest.py +0 -0
  20. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/constants.py +0 -0
  21. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/dependencies.py +0 -0
  22. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/discovery.py +0 -0
  23. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/exceptions.py +0 -0
  24. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/local_client.py +0 -0
  25. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/task_client.py +0 -0
  26. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/types_.py +0 -0
  27. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/utils.py +0 -0
  28. {datashare_python-0.2.26 → datashare_python-0.3.0}/datashare_python/worker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datashare-python
3
- Version: 0.2.26
3
+ Version: 0.3.0
4
4
  Summary: Manage Pythoœn 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/
@@ -109,8 +109,12 @@ async def start(
109
109
  )
110
110
  else:
111
111
  bootstrap_config = WorkerConfig()
112
+ worker_id = create_worker_id(worker_id_prefix or "worker")
112
113
  logger.info(
113
- "starting worker with config: %s", bootstrap_config.model_dump_json(indent=2)
114
+ "starting worker %s on queue %s, with config: %s",
115
+ worker_id,
116
+ queue,
117
+ bootstrap_config.model_dump_json(indent=2),
114
118
  )
115
119
  temporal_override = dict()
116
120
  if temporal_address is not None:
@@ -124,7 +128,6 @@ async def start(
124
128
  registered_wfs, registered_acts, registered_deps = discover(
125
129
  workflows, act_names=activities, deps_name=dependencies
126
130
  )
127
- worker_id = create_worker_id(worker_id_prefix or "worker")
128
131
  client = await bootstrap_config.to_temporal_client()
129
132
  event_loop = asyncio.get_event_loop()
130
133
  async with bootstrap_worker(
@@ -31,18 +31,10 @@ class BaseModel(_BaseModel):
31
31
  model_config = merge_configs(icij_config(), no_enum_values_config())
32
32
 
33
33
 
34
- class BasePayload(_BaseModel):
35
- model_config = icij_config()
36
-
37
-
38
34
  class DatashareModel(BaseModel):
39
35
  model_config = merge_configs(BaseModel.model_config, lowercamel_case_config())
40
36
 
41
37
 
42
- class LowerCamelCaseModel(_BaseModel):
43
- model_config = merge_configs(icij_config(), lowercamel_case_config())
44
-
45
-
46
38
  @unique
47
39
  class TaskState(StrEnum):
48
40
  CREATED = "CREATED"
@@ -61,7 +61,6 @@ def init_project(name: str, path: Path) -> None:
61
61
  pyproject_toml = tomlkit.loads(pyproject_toml_path.read_text())
62
62
  pyproject_toml = _update_pyproject_toml(pyproject_toml, package_name=package_name)
63
63
  pyproject_toml_path.write_text(tomlkit.dumps(pyproject_toml))
64
- raise NotImplementedError("implement entry point and dockerfile init")
65
64
 
66
65
 
67
66
  _BASE_DEPS = {"datashare-python", "icij-common", "temporalio"}
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "datashare-python"
3
- version = "0.2.26"
3
+ version = "0.3.0"
4
4
  description = "Manage Pythoœn tasks and local resources in Datashare"
5
5
  authors = [
6
6
  { name = "Clément Doumouro", email = "cdoumouro@icij.org" },