arkindex-base-worker 0.5.0b1__py3-none-any.whl → 0.5.0b3__py3-none-any.whl
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.
- {arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/METADATA +6 -6
- {arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/RECORD +9 -9
- {arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/WHEEL +1 -1
- arkindex_worker/image.py +4 -2
- arkindex_worker/worker/base.py +3 -3
- tests/conftest.py +0 -14
- tests/test_base_worker.py +1 -1
- {arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/licenses/LICENSE +0 -0
- {arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arkindex-base-worker
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.0b3
|
|
4
4
|
Summary: Base Worker to easily build Arkindex ML workflows
|
|
5
5
|
Author-email: Teklia <contact@teklia.com>
|
|
6
6
|
Maintainer-email: Teklia <contact@teklia.com>
|
|
@@ -41,15 +41,15 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
41
41
|
Requires-Python: >=3.10
|
|
42
42
|
Description-Content-Type: text/markdown
|
|
43
43
|
License-File: LICENSE
|
|
44
|
-
Requires-Dist: humanize==4.
|
|
44
|
+
Requires-Dist: humanize==4.12.3
|
|
45
45
|
Requires-Dist: peewee~=3.17
|
|
46
|
-
Requires-Dist: Pillow==11.
|
|
47
|
-
Requires-Dist: python-gnupg==0.5.
|
|
46
|
+
Requires-Dist: Pillow==11.2.1
|
|
47
|
+
Requires-Dist: python-gnupg==0.5.4
|
|
48
48
|
Requires-Dist: shapely==2.0.6
|
|
49
|
-
Requires-Dist: teklia-toolbox==0.1.
|
|
49
|
+
Requires-Dist: teklia-toolbox==0.1.9
|
|
50
50
|
Requires-Dist: zstandard==0.23.0
|
|
51
51
|
Provides-Extra: tests
|
|
52
|
-
Requires-Dist: pytest==8.3.
|
|
52
|
+
Requires-Dist: pytest==8.3.5; extra == "tests"
|
|
53
53
|
Requires-Dist: pytest-mock==3.14.0; extra == "tests"
|
|
54
54
|
Requires-Dist: pytest-responses==0.5.1; extra == "tests"
|
|
55
55
|
Dynamic: license-file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
arkindex_base_worker-0.5.
|
|
1
|
+
arkindex_base_worker-0.5.0b3.dist-info/licenses/LICENSE,sha256=NVshRi1efwVezMfW7xXYLrdDr2Li1AfwfGOd5WuH1kQ,1063
|
|
2
2
|
arkindex_worker/__init__.py,sha256=Sdt5KXn8EgURb2MurYVrUWaHbH3iFA1XLRo0Lc5AJ44,250
|
|
3
3
|
arkindex_worker/cache.py,sha256=NpCsYFnqBmyBrACqeV7c3P6j6YrTtyi-HgtewwxUpxc,11221
|
|
4
|
-
arkindex_worker/image.py,sha256=
|
|
4
|
+
arkindex_worker/image.py,sha256=GvIpW7LNSalVw3Obt9nySDWnW7-NbC0__SWREEQqVCk,20696
|
|
5
5
|
arkindex_worker/models.py,sha256=bPQzGZNs5a6z6DEcygsa8T33VOqPlMUbwKzHqlKzwbw,9923
|
|
6
6
|
arkindex_worker/utils.py,sha256=MbbJT8oh8DMHHR-vidFeXdUH0TSXGWm7ZDGWzrRXoEY,9933
|
|
7
7
|
arkindex_worker/worker/__init__.py,sha256=jipbseOaEggAacd0sU3Xe0q2de8FHIMbmpZKoHXrlAw,15867
|
|
8
|
-
arkindex_worker/worker/base.py,sha256=
|
|
8
|
+
arkindex_worker/worker/base.py,sha256=03WLu7R8vca54LI00g-S0EqIbFiNaIsgZjN6zmfHisw,20126
|
|
9
9
|
arkindex_worker/worker/classification.py,sha256=qvykymkgd4nGywHCxL8obo4egstoGsmWNS4Ztc1qNWQ,11024
|
|
10
10
|
arkindex_worker/worker/corpus.py,sha256=MeIMod7jkWyX0frtD0a37rhumnMV3p9ZOC1xwAoXrAA,2291
|
|
11
11
|
arkindex_worker/worker/dataset.py,sha256=tVaPx43vaH-KTtx4w5V06e26ha8XPfiJTRzBXlu928Y,5273
|
|
@@ -21,8 +21,8 @@ examples/standalone/python/worker.py,sha256=Zr4s4pHvgexEjlkixLFYZp1UuwMLeoTxjyNG
|
|
|
21
21
|
examples/tooled/python/worker.py,sha256=kIYlHLsO5UpwX4XtERRq4tf2qTsvqKK30C-w8t0yyhA,1821
|
|
22
22
|
hooks/pre_gen_project.py,sha256=xQJERv3vv9VzIqcBHI281eeWLWREXUF4mMw7PvJHHXM,269
|
|
23
23
|
tests/__init__.py,sha256=DG--S6IpGl399rzSAjDdHL76CkOIeZIjajCcyUSDhOQ,241
|
|
24
|
-
tests/conftest.py,sha256=
|
|
25
|
-
tests/test_base_worker.py,sha256=
|
|
24
|
+
tests/conftest.py,sha256=kR9zYRHri2BPvzQbbhnvylHba2xvw0w8v1qaLwdGkK0,20993
|
|
25
|
+
tests/test_base_worker.py,sha256=dA00oxauTSCwnFX3ZFBl-RI71HN6GmK48FBBW_oYN-k,30627
|
|
26
26
|
tests/test_cache.py,sha256=ii0gyr0DrG7ChEs7pmT8hMdSguAOAcCze4bRMiFQxuk,10640
|
|
27
27
|
tests/test_dataset_worker.py,sha256=z8ydliUlwW2j-irgLAotJMacgJXkVvF5TgsWLyCn1Jo,22087
|
|
28
28
|
tests/test_element.py,sha256=2G9M15TLxQRmvrWM9Kw2ucnElh4kSv_oF_5FYwwAxTY,13181
|
|
@@ -55,7 +55,7 @@ worker-demo/tests/conftest.py,sha256=XzNMNeg6pmABUAH8jN6eZTlZSFGLYjS3-DTXjiRN6Yc
|
|
|
55
55
|
worker-demo/tests/test_worker.py,sha256=3DLd4NRK4bfyatG5P_PK4k9P9tJHx9XQq5_ryFEEFVg,304
|
|
56
56
|
worker-demo/worker_demo/__init__.py,sha256=2BPomV8ZMNf3YXJgloatKeHQCE6QOkwmsHGkO6MkQuM,125
|
|
57
57
|
worker-demo/worker_demo/worker.py,sha256=Rt-DjWa5iBP08k58NDZMfeyPuFbtNcbX6nc5jFX7GNo,440
|
|
58
|
-
arkindex_base_worker-0.5.
|
|
59
|
-
arkindex_base_worker-0.5.
|
|
60
|
-
arkindex_base_worker-0.5.
|
|
61
|
-
arkindex_base_worker-0.5.
|
|
58
|
+
arkindex_base_worker-0.5.0b3.dist-info/METADATA,sha256=N8XHi4oVPpVnhutNdUWIV_lySfkUkTymABz8wpNhR4k,3136
|
|
59
|
+
arkindex_base_worker-0.5.0b3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
60
|
+
arkindex_base_worker-0.5.0b3.dist-info/top_level.txt,sha256=-vNjP2VfROx0j83mdi9aIqRZ88eoJjxeWz-R_gPgyXU,49
|
|
61
|
+
arkindex_base_worker-0.5.0b3.dist-info/RECORD,,
|
arkindex_worker/image.py
CHANGED
|
@@ -24,7 +24,8 @@ from tenacity import (
|
|
|
24
24
|
retry,
|
|
25
25
|
retry_if_exception_type,
|
|
26
26
|
stop_after_attempt,
|
|
27
|
-
|
|
27
|
+
wait_chain,
|
|
28
|
+
wait_fixed,
|
|
28
29
|
)
|
|
29
30
|
|
|
30
31
|
from arkindex_worker import VERSION, logger
|
|
@@ -334,7 +335,8 @@ def _retry_log(retry_state, *args, **kwargs):
|
|
|
334
335
|
|
|
335
336
|
@retry(
|
|
336
337
|
stop=stop_after_attempt(3),
|
|
337
|
-
|
|
338
|
+
# In the event of `requests.RequestException` errors, the call will be retried after 5 seconds, 10 seconds and finally 90 seconds before failing.
|
|
339
|
+
wait=wait_chain(wait_fixed(5), wait_fixed(10), wait_fixed(90)),
|
|
338
340
|
retry=retry_if_exception_type(requests.RequestException),
|
|
339
341
|
before_sleep=_retry_log,
|
|
340
342
|
reraise=True,
|
arkindex_worker/worker/base.py
CHANGED
|
@@ -275,12 +275,12 @@ class BaseWorker:
|
|
|
275
275
|
# Retrieve initial configuration from API
|
|
276
276
|
self.config = worker_version["configuration"].get("configuration", {})
|
|
277
277
|
if "user_configuration" in worker_version["configuration"]:
|
|
278
|
-
# Add
|
|
278
|
+
# Add missing values (using the provided default if set) to user_configuration
|
|
279
279
|
for key, value in worker_version["configuration"][
|
|
280
280
|
"user_configuration"
|
|
281
281
|
].items():
|
|
282
|
-
if
|
|
283
|
-
self.user_configuration[key] = value
|
|
282
|
+
if key not in self.model_configuration:
|
|
283
|
+
self.user_configuration[key] = value.get("default")
|
|
284
284
|
|
|
285
285
|
# Load all required secrets
|
|
286
286
|
required_secrets = worker_version["configuration"].get("secrets", [])
|
tests/conftest.py
CHANGED
|
@@ -3,7 +3,6 @@ import json
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
5
|
import time
|
|
6
|
-
from pathlib import Path
|
|
7
6
|
from uuid import UUID
|
|
8
7
|
|
|
9
8
|
import pytest
|
|
@@ -78,19 +77,6 @@ def _cache_yaml(monkeypatch):
|
|
|
78
77
|
def _setup_api(responses, monkeypatch, _cache_yaml):
|
|
79
78
|
# Always use the environment variable first
|
|
80
79
|
schema_url = os.environ.get("ARKINDEX_API_SCHEMA_URL")
|
|
81
|
-
if schema_url is None:
|
|
82
|
-
# Try to load a local schema as the current developer of base-worker
|
|
83
|
-
# may also work on the backend nearby
|
|
84
|
-
paths = [
|
|
85
|
-
"~/dev/ark/backend/schema.yml",
|
|
86
|
-
"~/dev/ark/backend/output/schema.yml",
|
|
87
|
-
]
|
|
88
|
-
for path in paths:
|
|
89
|
-
path = Path(path).expanduser().absolute()
|
|
90
|
-
if path.exists():
|
|
91
|
-
monkeypatch.setenv("ARKINDEX_API_SCHEMA_URL", str(path))
|
|
92
|
-
schema_url = str(path)
|
|
93
|
-
break
|
|
94
80
|
|
|
95
81
|
# Fallback to prod environment
|
|
96
82
|
if schema_url is None:
|
tests/test_base_worker.py
CHANGED
{arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{arkindex_base_worker-0.5.0b1.dist-info → arkindex_base_worker-0.5.0b3.dist-info}/top_level.txt
RENAMED
|
File without changes
|