arkindex-base-worker 0.3.7rc8__tar.gz → 0.3.7rc10__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.
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/PKG-INFO +6 -2
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_base_worker.egg-info/PKG-INFO +6 -2
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_base_worker.egg-info/SOURCES.txt +1 -2
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_base_worker.egg-info/requires.txt +6 -1
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/utils.py +13 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/pyproject.toml +26 -6
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_utils.py +23 -1
- arkindex-base-worker-0.3.7rc10/worker-demo/tests/__init__.py +0 -0
- arkindex-base-worker-0.3.7rc8/docs-requirements.txt +0 -7
- arkindex-base-worker-0.3.7rc8/requirements.txt +0 -7
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/LICENSE +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/README.md +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_base_worker.egg-info/dependency_links.txt +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_base_worker.egg-info/top_level.txt +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/__init__.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/cache.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/image.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/models.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/__init__.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/base.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/classification.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/dataset.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/element.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/entity.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/metadata.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/task.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/training.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/transcription.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/version.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/hooks/pre_gen_project.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/setup.cfg +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/__init__.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/conftest.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_base_worker.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_cache.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_dataset_worker.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_element.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/__init__.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_classifications.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_cli.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_dataset.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_elements.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_entities.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_metadata.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_task.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_training.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_transcriptions.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_elements_worker/test_worker.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_image.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_merge.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/tests/conftest.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/tests/test_worker.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/worker_demo/__init__.py +0 -0
- {arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/worker_demo/worker.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: arkindex-base-worker
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7rc10
|
|
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>
|
|
@@ -46,7 +46,7 @@ Requires-Dist: Pillow==10.2.0
|
|
|
46
46
|
Requires-Dist: pymdown-extensions==10.7
|
|
47
47
|
Requires-Dist: python-gnupg==0.5.2
|
|
48
48
|
Requires-Dist: shapely==2.0.3
|
|
49
|
-
Requires-Dist: teklia-toolbox==0.1.
|
|
49
|
+
Requires-Dist: teklia-toolbox==0.1.4
|
|
50
50
|
Requires-Dist: zstandard==0.22.0
|
|
51
51
|
Provides-Extra: docs
|
|
52
52
|
Requires-Dist: black==24.2.0; extra == "docs"
|
|
@@ -56,6 +56,10 @@ Requires-Dist: mkdocs-material==9.5.10; extra == "docs"
|
|
|
56
56
|
Requires-Dist: mkdocstrings==0.24.0; extra == "docs"
|
|
57
57
|
Requires-Dist: mkdocstrings-python==1.8.0; extra == "docs"
|
|
58
58
|
Requires-Dist: recommonmark==0.7.1; extra == "docs"
|
|
59
|
+
Provides-Extra: tests
|
|
60
|
+
Requires-Dist: pytest==8.0.1; extra == "tests"
|
|
61
|
+
Requires-Dist: pytest-mock==3.12.0; extra == "tests"
|
|
62
|
+
Requires-Dist: pytest-responses==0.5.1; extra == "tests"
|
|
59
63
|
|
|
60
64
|
# Arkindex base Worker
|
|
61
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: arkindex-base-worker
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7rc10
|
|
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>
|
|
@@ -46,7 +46,7 @@ Requires-Dist: Pillow==10.2.0
|
|
|
46
46
|
Requires-Dist: pymdown-extensions==10.7
|
|
47
47
|
Requires-Dist: python-gnupg==0.5.2
|
|
48
48
|
Requires-Dist: shapely==2.0.3
|
|
49
|
-
Requires-Dist: teklia-toolbox==0.1.
|
|
49
|
+
Requires-Dist: teklia-toolbox==0.1.4
|
|
50
50
|
Requires-Dist: zstandard==0.22.0
|
|
51
51
|
Provides-Extra: docs
|
|
52
52
|
Requires-Dist: black==24.2.0; extra == "docs"
|
|
@@ -56,6 +56,10 @@ Requires-Dist: mkdocs-material==9.5.10; extra == "docs"
|
|
|
56
56
|
Requires-Dist: mkdocstrings==0.24.0; extra == "docs"
|
|
57
57
|
Requires-Dist: mkdocstrings-python==1.8.0; extra == "docs"
|
|
58
58
|
Requires-Dist: recommonmark==0.7.1; extra == "docs"
|
|
59
|
+
Provides-Extra: tests
|
|
60
|
+
Requires-Dist: pytest==8.0.1; extra == "tests"
|
|
61
|
+
Requires-Dist: pytest-mock==3.12.0; extra == "tests"
|
|
62
|
+
Requires-Dist: pytest-responses==0.5.1; extra == "tests"
|
|
59
63
|
|
|
60
64
|
# Arkindex base Worker
|
|
61
65
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
|
-
docs-requirements.txt
|
|
4
3
|
pyproject.toml
|
|
5
|
-
requirements.txt
|
|
6
4
|
arkindex_base_worker.egg-info/PKG-INFO
|
|
7
5
|
arkindex_base_worker.egg-info/SOURCES.txt
|
|
8
6
|
arkindex_base_worker.egg-info/dependency_links.txt
|
|
@@ -45,6 +43,7 @@ tests/test_elements_worker/test_task.py
|
|
|
45
43
|
tests/test_elements_worker/test_training.py
|
|
46
44
|
tests/test_elements_worker/test_transcriptions.py
|
|
47
45
|
tests/test_elements_worker/test_worker.py
|
|
46
|
+
worker-demo/tests/__init__.py
|
|
48
47
|
worker-demo/tests/conftest.py
|
|
49
48
|
worker-demo/tests/test_worker.py
|
|
50
49
|
worker-demo/worker_demo/__init__.py
|
|
@@ -3,7 +3,7 @@ Pillow==10.2.0
|
|
|
3
3
|
pymdown-extensions==10.7
|
|
4
4
|
python-gnupg==0.5.2
|
|
5
5
|
shapely==2.0.3
|
|
6
|
-
teklia-toolbox==0.1.
|
|
6
|
+
teklia-toolbox==0.1.4
|
|
7
7
|
zstandard==0.22.0
|
|
8
8
|
|
|
9
9
|
[docs]
|
|
@@ -14,3 +14,8 @@ mkdocs-material==9.5.10
|
|
|
14
14
|
mkdocstrings==0.24.0
|
|
15
15
|
mkdocstrings-python==1.8.0
|
|
16
16
|
recommonmark==0.7.1
|
|
17
|
+
|
|
18
|
+
[tests]
|
|
19
|
+
pytest==8.0.1
|
|
20
|
+
pytest-mock==3.12.0
|
|
21
|
+
pytest-responses==0.5.1
|
|
@@ -10,6 +10,19 @@ import zstandard as zstd
|
|
|
10
10
|
|
|
11
11
|
logger = logging.getLogger(__name__)
|
|
12
12
|
|
|
13
|
+
MANUAL_SOURCE = "manual"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def parse_source_id(value: str) -> bool | str | None:
|
|
17
|
+
"""
|
|
18
|
+
Parse a UUID argument (Worker Version, Worker Run, ...) to use it directly in the API.
|
|
19
|
+
Arkindex API filters generally expect `False` to filter manual sources.
|
|
20
|
+
"""
|
|
21
|
+
if value == MANUAL_SOURCE:
|
|
22
|
+
return False
|
|
23
|
+
return value or None
|
|
24
|
+
|
|
25
|
+
|
|
13
26
|
CHUNK_SIZE = 1024
|
|
14
27
|
"""Chunk Size used for ZSTD compression"""
|
|
15
28
|
|
|
@@ -4,10 +4,18 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "arkindex-base-worker"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.7rc10"
|
|
8
8
|
description = "Base Worker to easily build Arkindex ML workflows"
|
|
9
9
|
license = { file = "LICENSE" }
|
|
10
|
-
|
|
10
|
+
dependencies = [
|
|
11
|
+
"peewee==3.17.0",
|
|
12
|
+
"Pillow==10.2.0",
|
|
13
|
+
"pymdown-extensions==10.7",
|
|
14
|
+
"python-gnupg==0.5.2",
|
|
15
|
+
"shapely==2.0.3",
|
|
16
|
+
"teklia-toolbox==0.1.4",
|
|
17
|
+
"zstandard==0.22.0",
|
|
18
|
+
]
|
|
11
19
|
authors = [
|
|
12
20
|
{ name = "Teklia", email = "contact@teklia.com" },
|
|
13
21
|
]
|
|
@@ -35,13 +43,25 @@ Repository = "https://gitlab.teklia.com/workers/base-worker"
|
|
|
35
43
|
"Bug Tracker" = "https://gitlab.teklia.com/workers/base-worker/issues"
|
|
36
44
|
Authors = "https://teklia.com"
|
|
37
45
|
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
docs = [
|
|
48
|
+
"black==24.2.0",
|
|
49
|
+
"doc8==1.1.1",
|
|
50
|
+
"mkdocs==1.5.3",
|
|
51
|
+
"mkdocs-material==9.5.10",
|
|
52
|
+
"mkdocstrings==0.24.0",
|
|
53
|
+
"mkdocstrings-python==1.8.0",
|
|
54
|
+
"recommonmark==0.7.1",
|
|
55
|
+
]
|
|
56
|
+
tests = [
|
|
57
|
+
"pytest==8.0.1",
|
|
58
|
+
"pytest-mock==3.12.0",
|
|
59
|
+
"pytest-responses==0.5.1",
|
|
60
|
+
]
|
|
61
|
+
|
|
38
62
|
[tool.setuptools.packages]
|
|
39
63
|
find = {}
|
|
40
64
|
|
|
41
|
-
[tool.setuptools.dynamic]
|
|
42
|
-
dependencies = { file = ["requirements.txt"] }
|
|
43
|
-
optional-dependencies = { docs = { file = ["docs-requirements.txt"] } }
|
|
44
|
-
|
|
45
65
|
[tool.ruff]
|
|
46
66
|
exclude = [".git", "__pycache__"]
|
|
47
67
|
|
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import pytest
|
|
4
|
+
|
|
5
|
+
from arkindex_worker.utils import (
|
|
6
|
+
close_delete_file,
|
|
7
|
+
extract_tar_zst_archive,
|
|
8
|
+
parse_source_id,
|
|
9
|
+
)
|
|
4
10
|
|
|
5
11
|
FIXTURES = Path(__file__).absolute().parent / "data"
|
|
6
12
|
ARCHIVE = FIXTURES / "archive.tar.zst"
|
|
7
13
|
|
|
8
14
|
|
|
15
|
+
@pytest.mark.parametrize(
|
|
16
|
+
("source_id", "expected"),
|
|
17
|
+
[
|
|
18
|
+
(None, None),
|
|
19
|
+
("", None),
|
|
20
|
+
(
|
|
21
|
+
"cafecafe-cafe-cafe-cafe-cafecafecafe",
|
|
22
|
+
"cafecafe-cafe-cafe-cafe-cafecafecafe",
|
|
23
|
+
),
|
|
24
|
+
("manual", False),
|
|
25
|
+
],
|
|
26
|
+
)
|
|
27
|
+
def test_parse_source_id(source_id, expected):
|
|
28
|
+
assert parse_source_id(source_id) == expected
|
|
29
|
+
|
|
30
|
+
|
|
9
31
|
def test_extract_tar_zst_archive(tmp_path):
|
|
10
32
|
destination = tmp_path / "destination"
|
|
11
33
|
_, archive_path = extract_tar_zst_archive(ARCHIVE, destination)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/__init__.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/base.py
RENAMED
|
File without changes
|
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/dataset.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/element.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/entity.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/metadata.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/task.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/training.py
RENAMED
|
File without changes
|
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/arkindex_worker/worker/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/tests/test_dataset_worker.py
RENAMED
|
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
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/tests/conftest.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/tests/test_worker.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/worker_demo/__init__.py
RENAMED
|
File without changes
|
{arkindex-base-worker-0.3.7rc8 → arkindex-base-worker-0.3.7rc10}/worker-demo/worker_demo/worker.py
RENAMED
|
File without changes
|