hexkit 3.8.0__tar.gz → 3.8.2__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.
- {hexkit-3.8.0 → hexkit-3.8.2}/LICENSE +1 -1
- {hexkit-3.8.0/src/hexkit.egg-info → hexkit-3.8.2}/PKG-INFO +3 -2
- {hexkit-3.8.0 → hexkit-3.8.2}/pyproject.toml +6 -3
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/__main__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/base.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/config.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/correlation.py +5 -5
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/custom_types.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/log.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/dao.py +6 -6
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/daopub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/daosub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/eventpub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/eventsub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/protocols/objstorage.py +2 -2
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/__init__.py +2 -2
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/config.py +2 -2
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/provider/__init__.py +3 -3
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/provider/daosub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/provider/eventpub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/provider/eventsub.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/provider/utils.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/testcontainer.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/akafka/testutils.py +7 -7
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/mongodb/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/mongodb/provider.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/mongodb/testutils.py +4 -4
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/mongokafka/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/mongokafka/provider.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/mongokafka/testutils.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/provider.py +25 -7
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/test_files/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/testutils/__init__.py +14 -14
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/testutils/_fixtures.py +9 -9
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/testutils/_typical_workflow.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/testutils/_utils.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/testing/__init__.py +1 -1
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/testing/eventpub.py +2 -2
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/utils.py +2 -2
- {hexkit-3.8.0 → hexkit-3.8.2/src/hexkit.egg-info}/PKG-INFO +3 -2
- {hexkit-3.8.0 → hexkit-3.8.2}/MANIFEST.in +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/README.md +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/setup.cfg +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/test_files/test_file1.yaml +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/test_files/test_file2.yaml +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/test_files/test_file3.yaml +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/providers/s3/test_files/test_file4.yaml +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit/py.typed +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit.egg-info/SOURCES.txt +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit.egg-info/dependency_links.txt +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit.egg-info/requires.txt +0 -0
- {hexkit-3.8.0 → hexkit-3.8.2}/src/hexkit.egg-info/top_level.txt +0 -0
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright 2021 -
|
|
189
|
+
Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
190
190
|
for the German Human Genome-Phenome Archive (GHGA)
|
|
191
191
|
|
|
192
192
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hexkit
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.2
|
|
4
4
|
Summary: A Toolkit for Building Microservices using the Hexagonal Architecture
|
|
5
5
|
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
|
|
6
6
|
License: Apache 2.0
|
|
@@ -42,6 +42,7 @@ Provides-Extra: test
|
|
|
42
42
|
Requires-Dist: hexkit[test-akafka,test-mongodb,test-s3]; extra == "test"
|
|
43
43
|
Provides-Extra: all
|
|
44
44
|
Requires-Dist: hexkit[test]; extra == "all"
|
|
45
|
+
Dynamic: license-file
|
|
45
46
|
|
|
46
47
|

|
|
47
48
|
[](https://pypi.python.org/pypi/hexkit/)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
|
-
"setuptools>=
|
|
3
|
+
"setuptools>=78.1",
|
|
4
4
|
]
|
|
5
5
|
build-backend = "setuptools.build_meta"
|
|
6
6
|
|
|
@@ -23,7 +23,7 @@ classifiers = [
|
|
|
23
23
|
"Intended Audience :: Developers",
|
|
24
24
|
]
|
|
25
25
|
name = "hexkit"
|
|
26
|
-
version = "3.8.
|
|
26
|
+
version = "3.8.2"
|
|
27
27
|
description = "A Toolkit for Building Microservices using the Hexagonal Architecture"
|
|
28
28
|
dependencies = [
|
|
29
29
|
"pydantic >=2, <3",
|
|
@@ -95,6 +95,7 @@ fixable = [
|
|
|
95
95
|
"UP",
|
|
96
96
|
"I",
|
|
97
97
|
"D",
|
|
98
|
+
"RUF022",
|
|
98
99
|
]
|
|
99
100
|
ignore = [
|
|
100
101
|
"E111",
|
|
@@ -114,6 +115,7 @@ ignore = [
|
|
|
114
115
|
"D206",
|
|
115
116
|
"D300",
|
|
116
117
|
"UP040",
|
|
118
|
+
"PLC0206",
|
|
117
119
|
]
|
|
118
120
|
select = [
|
|
119
121
|
"C90",
|
|
@@ -173,8 +175,9 @@ check_untyped_defs = true
|
|
|
173
175
|
no_site_packages = false
|
|
174
176
|
|
|
175
177
|
[tool.pytest.ini_options]
|
|
176
|
-
minversion = "8.
|
|
178
|
+
minversion = "8.3"
|
|
177
179
|
asyncio_mode = "strict"
|
|
180
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
178
181
|
|
|
179
182
|
[tool.coverage.paths]
|
|
180
183
|
source = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -28,13 +28,13 @@ log = logging.getLogger(__name__)
|
|
|
28
28
|
correlation_id_var: ContextVar[str] = ContextVar("correlation_id", default="")
|
|
29
29
|
|
|
30
30
|
__all__ = [
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"CorrelationIdContextError",
|
|
32
|
+
"InvalidCorrelationIdError",
|
|
33
33
|
"get_correlation_id",
|
|
34
34
|
"new_correlation_id",
|
|
35
|
+
"set_correlation_id",
|
|
36
|
+
"set_new_correlation_id",
|
|
35
37
|
"validate_correlation_id",
|
|
36
|
-
"CorrelationIdContextError",
|
|
37
|
-
"InvalidCorrelationIdError",
|
|
38
38
|
]
|
|
39
39
|
|
|
40
40
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -35,13 +35,13 @@ from typing_extensions import deprecated
|
|
|
35
35
|
from hexkit.utils import FieldNotInModelError, validate_fields_in_model
|
|
36
36
|
|
|
37
37
|
__all__ = [
|
|
38
|
-
"
|
|
39
|
-
"ResourceAlreadyExistsError",
|
|
40
|
-
"FindError",
|
|
41
|
-
"MultipleHitsFoundError",
|
|
38
|
+
"DaoFactoryProtocol",
|
|
42
39
|
"DaoNaturalId",
|
|
43
40
|
"DaoSurrogateId",
|
|
44
|
-
"
|
|
41
|
+
"FindError",
|
|
42
|
+
"MultipleHitsFoundError",
|
|
43
|
+
"ResourceAlreadyExistsError",
|
|
44
|
+
"ResourceNotFoundError",
|
|
45
45
|
"uuid4_id_generator",
|
|
46
46
|
]
|
|
47
47
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -22,7 +22,7 @@ import re
|
|
|
22
22
|
from abc import ABC, abstractmethod
|
|
23
23
|
from typing import NamedTuple, Optional
|
|
24
24
|
|
|
25
|
-
__all__ = ["
|
|
25
|
+
__all__ = ["ObjectStorageProtocol", "PresignedPostURL"]
|
|
26
26
|
|
|
27
27
|
DEFAULT_URL_EXPIRATION_PERIOD = 24 * 60 * 60 # default expiration time 24 hours
|
|
28
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -27,8 +27,8 @@ from .provider import (
|
|
|
27
27
|
)
|
|
28
28
|
|
|
29
29
|
__all__ = [
|
|
30
|
+
"KafkaConfig",
|
|
30
31
|
"KafkaEventPublisher",
|
|
31
32
|
"KafkaEventSubscriber",
|
|
32
|
-
"KafkaConfig",
|
|
33
33
|
"KafkaOutboxSubscriber",
|
|
34
34
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -64,7 +64,7 @@ class KafkaConfig(BaseSettings):
|
|
|
64
64
|
default="", description="Optional filename containing the client private key."
|
|
65
65
|
)
|
|
66
66
|
kafka_ssl_password: SecretStr = Field(
|
|
67
|
-
default="",
|
|
67
|
+
default="", # type: ignore
|
|
68
68
|
description="Optional password to be used for the client private key.",
|
|
69
69
|
)
|
|
70
70
|
generate_correlation_id: bool = Field(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -29,10 +29,10 @@ from .eventsub import (
|
|
|
29
29
|
)
|
|
30
30
|
|
|
31
31
|
__all__ = [
|
|
32
|
+
"ConsumerEvent",
|
|
32
33
|
"KafkaEventPublisher",
|
|
33
34
|
"KafkaEventSubscriber",
|
|
34
|
-
"
|
|
35
|
+
"KafkaOutboxSubscriber",
|
|
35
36
|
"get_header_value",
|
|
36
37
|
"headers_as_dict",
|
|
37
|
-
"KafkaOutboxSubscriber",
|
|
38
38
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -53,19 +53,19 @@ __all__ = [
|
|
|
53
53
|
"EventBase",
|
|
54
54
|
"EventRecorder",
|
|
55
55
|
"ExpectedEvent",
|
|
56
|
-
"RecordedEvent",
|
|
57
|
-
"ValidationError",
|
|
58
56
|
"KafkaConfig",
|
|
59
57
|
"KafkaContainerFixture",
|
|
60
58
|
"KafkaEventPublisher",
|
|
61
59
|
"KafkaFixture",
|
|
62
|
-
"
|
|
60
|
+
"RecordedEvent",
|
|
61
|
+
"ValidationError",
|
|
62
|
+
"clean_kafka_fixture",
|
|
63
63
|
"get_clean_kafka_fixture",
|
|
64
|
+
"get_kafka_container_fixture",
|
|
64
65
|
"get_persistent_kafka_fixture",
|
|
65
66
|
"kafka_container_fixture",
|
|
66
|
-
"clean_kafka_fixture",
|
|
67
|
-
"persistent_kafka_fixture",
|
|
68
67
|
"kafka_fixture",
|
|
68
|
+
"persistent_kafka_fixture",
|
|
69
69
|
]
|
|
70
70
|
|
|
71
71
|
|
|
@@ -153,7 +153,7 @@ def check_recorded_events(
|
|
|
153
153
|
|
|
154
154
|
def get_field_mismatch_error(field, index):
|
|
155
155
|
return get_detailed_error(
|
|
156
|
-
details=f"the {field} of the recorded event no. {index+1}"
|
|
156
|
+
details=f"the {field} of the recorded event no. {index + 1}"
|
|
157
157
|
" does not match the expectations"
|
|
158
158
|
)
|
|
159
159
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -41,13 +41,13 @@ __all__ = [
|
|
|
41
41
|
"MongoDbContainerFixture",
|
|
42
42
|
"MongoDbDaoFactory",
|
|
43
43
|
"MongoDbFixture",
|
|
44
|
+
"clean_mongodb_fixture",
|
|
45
|
+
"get_clean_mongodb_fixture",
|
|
44
46
|
"get_mongodb_container_fixture",
|
|
45
47
|
"get_persistent_mongodb_fixture",
|
|
46
|
-
"get_clean_mongodb_fixture",
|
|
47
48
|
"mongodb_container_fixture",
|
|
48
|
-
"clean_mongodb_fixture",
|
|
49
|
-
"persistent_mongodb_fixture",
|
|
50
49
|
"mongodb_fixture",
|
|
50
|
+
"persistent_mongodb_fixture",
|
|
51
51
|
]
|
|
52
52
|
|
|
53
53
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -22,6 +22,7 @@ Utilities for testing are located in `./testutils.py`.
|
|
|
22
22
|
# ruff: noqa: PLR0913
|
|
23
23
|
|
|
24
24
|
import asyncio
|
|
25
|
+
import logging
|
|
25
26
|
import re
|
|
26
27
|
from functools import lru_cache
|
|
27
28
|
from pathlib import Path
|
|
@@ -409,20 +410,26 @@ class S3ObjectStorage(ObjectStorageProtocol):
|
|
|
409
410
|
|
|
410
411
|
(S3 allows multiple ongoing multi-part uploads.)
|
|
411
412
|
"""
|
|
413
|
+
uploads = []
|
|
412
414
|
try:
|
|
413
|
-
|
|
414
|
-
self._client.list_multipart_uploads,
|
|
415
|
+
response_iter = await asyncio.to_thread(
|
|
416
|
+
self._client.get_paginator("list_multipart_uploads").paginate,
|
|
415
417
|
Bucket=bucket_id,
|
|
416
418
|
)
|
|
419
|
+
for response_page in response_iter:
|
|
420
|
+
uploads.extend(
|
|
421
|
+
[
|
|
422
|
+
upload["UploadId"]
|
|
423
|
+
for upload in response_page.get("Uploads", [])
|
|
424
|
+
if upload["Key"] == object_id
|
|
425
|
+
]
|
|
426
|
+
)
|
|
417
427
|
except botocore.exceptions.ClientError as error:
|
|
418
428
|
raise self._translate_s3_client_errors(
|
|
419
429
|
error, bucket_id=bucket_id, object_id=object_id
|
|
420
430
|
) from error
|
|
421
431
|
|
|
422
|
-
|
|
423
|
-
return [
|
|
424
|
-
upload["UploadId"] for upload in upload_list if upload["Key"] == object_id
|
|
425
|
-
]
|
|
432
|
+
return uploads
|
|
426
433
|
|
|
427
434
|
async def _assert_no_multipart_upload(self, *, bucket_id: str, object_id: str):
|
|
428
435
|
"""Ensure that there are no active multi-part uploads for the given object."""
|
|
@@ -849,6 +856,17 @@ class S3ObjectStorage(ObjectStorageProtocol):
|
|
|
849
856
|
bucket_id=dest_bucket_id, object_id=dest_object_id
|
|
850
857
|
)
|
|
851
858
|
|
|
859
|
+
underway_operations = await self._list_multipart_upload_for_object(
|
|
860
|
+
bucket_id=dest_bucket_id, object_id=dest_object_id
|
|
861
|
+
)
|
|
862
|
+
if len(underway_operations) > 0:
|
|
863
|
+
logging.info(
|
|
864
|
+
"Upload or copy operation already exists for object id '%s' in bucket '%s'.",
|
|
865
|
+
dest_object_id,
|
|
866
|
+
dest_bucket_id,
|
|
867
|
+
)
|
|
868
|
+
return
|
|
869
|
+
|
|
852
870
|
part_size = calc_part_size(file_size=file_size)
|
|
853
871
|
|
|
854
872
|
transfer_config = TransferConfig(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -60,35 +60,35 @@ __all__ = [
|
|
|
60
60
|
"MEBIBYTE",
|
|
61
61
|
"TEST_FILE_DIR",
|
|
62
62
|
"TEST_FILE_PATHS",
|
|
63
|
+
"FederatedS3Fixture",
|
|
63
64
|
"FileObject",
|
|
64
65
|
"S3ContainerFixture",
|
|
65
66
|
"S3Fixture",
|
|
67
|
+
"S3MultiContainerFixture",
|
|
66
68
|
"calc_md5",
|
|
69
|
+
"check_part_size",
|
|
70
|
+
"clean_federated_s3_fixture",
|
|
67
71
|
"clean_s3_fixture",
|
|
72
|
+
"download_and_check_test_file",
|
|
73
|
+
"federated_s3_fixture",
|
|
74
|
+
"get_clean_federated_s3_fixture",
|
|
68
75
|
"get_clean_s3_fixture",
|
|
76
|
+
"get_persistent_federated_s3_fixture",
|
|
69
77
|
"get_persistent_s3_fixture",
|
|
70
78
|
"get_s3_container_fixture",
|
|
79
|
+
"get_s3_multi_container_fixture",
|
|
80
|
+
"multipart_upload_file",
|
|
81
|
+
"persistent_federated_s3_fixture",
|
|
71
82
|
"persistent_s3_fixture",
|
|
72
83
|
"populate_storage",
|
|
73
84
|
"s3_container_fixture",
|
|
74
85
|
"s3_fixture",
|
|
86
|
+
"s3_multi_container_fixture",
|
|
75
87
|
"temp_file_object",
|
|
76
88
|
"tmp_file",
|
|
77
|
-
"upload_file",
|
|
78
89
|
"typical_workflow",
|
|
79
|
-
"
|
|
80
|
-
"download_and_check_test_file",
|
|
81
|
-
"multipart_upload_file",
|
|
90
|
+
"upload_file",
|
|
82
91
|
"upload_part",
|
|
83
92
|
"upload_part_of_size",
|
|
84
93
|
"upload_part_via_url",
|
|
85
|
-
"FederatedS3Fixture",
|
|
86
|
-
"S3MultiContainerFixture",
|
|
87
|
-
"clean_federated_s3_fixture",
|
|
88
|
-
"federated_s3_fixture",
|
|
89
|
-
"get_clean_federated_s3_fixture",
|
|
90
|
-
"get_s3_multi_container_fixture",
|
|
91
|
-
"get_persistent_federated_s3_fixture",
|
|
92
|
-
"s3_multi_container_fixture",
|
|
93
|
-
"persistent_federated_s3_fixture",
|
|
94
94
|
]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -46,21 +46,21 @@ __all__ = [
|
|
|
46
46
|
"MEBIBYTE",
|
|
47
47
|
"TEST_FILE_DIR",
|
|
48
48
|
"TEST_FILE_PATHS",
|
|
49
|
-
"upload_file",
|
|
50
|
-
"populate_storage",
|
|
51
|
-
"calc_md5",
|
|
52
49
|
"FileObject",
|
|
53
50
|
"S3ContainerFixture",
|
|
54
|
-
"get_s3_container_fixture",
|
|
55
|
-
"s3_container_fixture",
|
|
56
51
|
"S3Fixture",
|
|
52
|
+
"calc_md5",
|
|
53
|
+
"clean_s3_fixture",
|
|
54
|
+
"get_clean_s3_fixture",
|
|
57
55
|
"get_persistent_s3_fixture",
|
|
56
|
+
"get_s3_container_fixture",
|
|
58
57
|
"persistent_s3_fixture",
|
|
59
|
-
"
|
|
60
|
-
"
|
|
58
|
+
"populate_storage",
|
|
59
|
+
"s3_container_fixture",
|
|
61
60
|
"s3_fixture",
|
|
62
|
-
"tmp_file",
|
|
63
61
|
"temp_file_object",
|
|
62
|
+
"tmp_file",
|
|
63
|
+
"upload_file",
|
|
64
64
|
]
|
|
65
65
|
|
|
66
66
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -26,7 +26,7 @@ from typing import NamedTuple, Optional
|
|
|
26
26
|
from hexkit.custom_types import JsonObject
|
|
27
27
|
from hexkit.protocols.eventpub import EventPublisherProtocol
|
|
28
28
|
|
|
29
|
-
__all__ = ["
|
|
29
|
+
__all__ = ["InMemEventPublisher", "InMemEventStore", "TopicExhaustedError"]
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class TopicExhaustedError(RuntimeError):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2021 -
|
|
1
|
+
# Copyright 2021 - 2025 Universität Tübingen, DKFZ, EMBL, and Universität zu Köln
|
|
2
2
|
# for the German Human Genome-Phenome Archive (GHGA)
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -69,7 +69,7 @@ def calc_part_size(*, file_size: int, preferred_part_size: Optional[int] = None)
|
|
|
69
69
|
|
|
70
70
|
if file_size > FILE_SIZE_LIMIT:
|
|
71
71
|
raise ValueError(
|
|
72
|
-
f"""Provided file size of {file_size/1024**4:2.f}TiB
|
|
72
|
+
f"""Provided file size of {file_size / 1024**4:2.f}TiB
|
|
73
73
|
exceeds maximum allowed file size of 5 TiB"""
|
|
74
74
|
)
|
|
75
75
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hexkit
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.2
|
|
4
4
|
Summary: A Toolkit for Building Microservices using the Hexagonal Architecture
|
|
5
5
|
Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
|
|
6
6
|
License: Apache 2.0
|
|
@@ -42,6 +42,7 @@ Provides-Extra: test
|
|
|
42
42
|
Requires-Dist: hexkit[test-akafka,test-mongodb,test-s3]; extra == "test"
|
|
43
43
|
Provides-Extra: all
|
|
44
44
|
Requires-Dist: hexkit[test]; extra == "all"
|
|
45
|
+
Dynamic: license-file
|
|
45
46
|
|
|
46
47
|

|
|
47
48
|
[](https://pypi.python.org/pypi/hexkit/)
|
|
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
|