nucliadb-utils 3.1.0.post492__py3-none-any.whl → 3.1.0.post494__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.
- nucliadb_utils/tests/asyncbenchmark.py +3 -3
- nucliadb_utils/tests/unit/test_utilities.py +19 -14
- {nucliadb_utils-3.1.0.post492.dist-info → nucliadb_utils-3.1.0.post494.dist-info}/METADATA +4 -5
- {nucliadb_utils-3.1.0.post492.dist-info → nucliadb_utils-3.1.0.post494.dist-info}/RECORD +7 -7
- {nucliadb_utils-3.1.0.post492.dist-info → nucliadb_utils-3.1.0.post494.dist-info}/WHEEL +0 -0
- {nucliadb_utils-3.1.0.post492.dist-info → nucliadb_utils-3.1.0.post494.dist-info}/top_level.txt +0 -0
- {nucliadb_utils-3.1.0.post492.dist-info → nucliadb_utils-3.1.0.post494.dist-info}/zip-safe +0 -0
@@ -158,7 +158,7 @@ class AsyncBenchmarkFixture(object): # pragma: no cover
|
|
158
158
|
self,
|
159
159
|
function_to_benchmark: Callable[..., Coroutine[Any, Any, T]],
|
160
160
|
*args,
|
161
|
-
**kwargs
|
161
|
+
**kwargs,
|
162
162
|
) -> T:
|
163
163
|
if self._mode:
|
164
164
|
self.has_error = True
|
@@ -177,7 +177,7 @@ class AsyncBenchmarkFixture(object): # pragma: no cover
|
|
177
177
|
self,
|
178
178
|
function_to_benchmark: Callable[..., Coroutine[Any, Any, T]],
|
179
179
|
*args,
|
180
|
-
**kwargs
|
180
|
+
**kwargs,
|
181
181
|
) -> T:
|
182
182
|
if self.enabled:
|
183
183
|
runner = await self._make_runner(function_to_benchmark, args, kwargs)
|
@@ -303,7 +303,7 @@ async def asyncbenchmark(request: pytest.FixtureRequest): # pragma: no cover
|
|
303
303
|
logger=bs.logger,
|
304
304
|
warner=request.node.warn,
|
305
305
|
disabled=bs.disabled,
|
306
|
-
**dict(bs.options, **options)
|
306
|
+
**dict(bs.options, **options),
|
307
307
|
)
|
308
308
|
request.addfinalizer(fixture._cleanup)
|
309
309
|
return fixture
|
@@ -41,8 +41,9 @@ def test_clean_utility():
|
|
41
41
|
@pytest.mark.asyncio
|
42
42
|
async def test_get_storage_s3():
|
43
43
|
s3 = AsyncMock()
|
44
|
-
with
|
45
|
-
|
44
|
+
with (
|
45
|
+
patch.object(utilities.storage_settings, "file_backend", "s3"),
|
46
|
+
patch("nucliadb_utils.storages.s3.S3Storage", return_value=s3),
|
46
47
|
):
|
47
48
|
assert await utilities.get_storage() == s3
|
48
49
|
|
@@ -50,8 +51,9 @@ async def test_get_storage_s3():
|
|
50
51
|
@pytest.mark.asyncio
|
51
52
|
async def test_get_storage_gcs():
|
52
53
|
gcs = AsyncMock()
|
53
|
-
with
|
54
|
-
|
54
|
+
with (
|
55
|
+
patch.object(utilities.storage_settings, "file_backend", "gcs"),
|
56
|
+
patch("nucliadb_utils.storages.gcs.GCSStorage", return_value=gcs),
|
55
57
|
):
|
56
58
|
assert await utilities.get_storage() == gcs
|
57
59
|
|
@@ -59,8 +61,9 @@ async def test_get_storage_gcs():
|
|
59
61
|
@pytest.mark.asyncio
|
60
62
|
async def test_get_storage_pg():
|
61
63
|
pg = AsyncMock()
|
62
|
-
with
|
63
|
-
|
64
|
+
with (
|
65
|
+
patch.object(utilities.storage_settings, "file_backend", "pg"),
|
66
|
+
patch("nucliadb_utils.storages.pg.PostgresStorage", return_value=pg),
|
64
67
|
):
|
65
68
|
assert await utilities.get_storage() == pg
|
66
69
|
|
@@ -68,10 +71,10 @@ async def test_get_storage_pg():
|
|
68
71
|
@pytest.mark.asyncio
|
69
72
|
async def test_get_storage_local():
|
70
73
|
local = AsyncMock()
|
71
|
-
with
|
72
|
-
utilities.storage_settings, "file_backend", "local"
|
73
|
-
|
74
|
-
"nucliadb_utils.storages.local.LocalStorage", return_value=local
|
74
|
+
with (
|
75
|
+
patch.object(utilities.storage_settings, "file_backend", "local"),
|
76
|
+
patch.object(utilities.storage_settings, "local_files", "/files"),
|
77
|
+
patch("nucliadb_utils.storages.local.LocalStorage", return_value=local),
|
75
78
|
):
|
76
79
|
assert await utilities.get_storage() == local
|
77
80
|
|
@@ -112,8 +115,9 @@ async def test_finalize_utilities():
|
|
112
115
|
|
113
116
|
@pytest.mark.asyncio
|
114
117
|
async def test_start_audit_utility():
|
115
|
-
with
|
116
|
-
"nucliadb_utils.utilities.
|
118
|
+
with (
|
119
|
+
patch("nucliadb_utils.utilities.NatsPubsub", return_value=AsyncMock()),
|
120
|
+
patch("nucliadb_utils.utilities.StreamAuditStorage", return_value=AsyncMock()),
|
117
121
|
):
|
118
122
|
await utilities.start_audit_utility("service")
|
119
123
|
|
@@ -122,8 +126,9 @@ async def test_start_audit_utility():
|
|
122
126
|
|
123
127
|
@pytest.mark.asyncio
|
124
128
|
async def test_stop_audit_utility():
|
125
|
-
with
|
126
|
-
"nucliadb_utils.utilities.
|
129
|
+
with (
|
130
|
+
patch("nucliadb_utils.utilities.NatsPubsub", return_value=AsyncMock()),
|
131
|
+
patch("nucliadb_utils.utilities.StreamAuditStorage", return_value=AsyncMock()),
|
127
132
|
):
|
128
133
|
await utilities.start_audit_utility("service")
|
129
134
|
await utilities.stop_audit_utility()
|
@@ -1,17 +1,16 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nucliadb-utils
|
3
|
-
Version: 3.1.0.
|
3
|
+
Version: 3.1.0.post494
|
4
4
|
Home-page: https://nuclia.com
|
5
5
|
License: BSD
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
7
7
|
Classifier: Programming Language :: Python
|
8
|
-
Classifier: Programming Language :: Python :: 3.8
|
9
8
|
Classifier: Programming Language :: Python :: 3.9
|
10
9
|
Classifier: Programming Language :: Python :: 3.10
|
11
10
|
Classifier: Programming Language :: Python :: 3.11
|
12
11
|
Classifier: Programming Language :: Python :: 3 :: Only
|
13
12
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
14
|
-
Requires-Python: >=3.
|
13
|
+
Requires-Python: >=3.9, <4
|
15
14
|
Requires-Dist: pydantic <2.0,>=1.8.2
|
16
15
|
Requires-Dist: aiohttp >=3.9.4
|
17
16
|
Requires-Dist: prometheus-client >=0.12.0
|
@@ -21,8 +20,8 @@ Requires-Dist: nats-py[nkeys] >=2.6.0
|
|
21
20
|
Requires-Dist: pyjwt >=2.4.0
|
22
21
|
Requires-Dist: memorylru >=1.1.2
|
23
22
|
Requires-Dist: mrflagly
|
24
|
-
Requires-Dist: nucliadb-protos >=3.1.0.
|
25
|
-
Requires-Dist: nucliadb-telemetry >=3.1.0.
|
23
|
+
Requires-Dist: nucliadb-protos >=3.1.0.post494
|
24
|
+
Requires-Dist: nucliadb-telemetry >=3.1.0.post494
|
26
25
|
Provides-Extra: cache
|
27
26
|
Requires-Dist: redis >=4.3.4 ; extra == 'cache'
|
28
27
|
Requires-Dist: orjson >=3.6.7 ; extra == 'cache'
|
@@ -40,7 +40,7 @@ nucliadb_utils/storages/s3.py,sha256=EYfn2CjoVL0tPFUqMaHgJYHjrSQaIUzLeNYoRa1qp-A
|
|
40
40
|
nucliadb_utils/storages/settings.py,sha256=bUl3D7To-s3OVXPFFF7LwJbEKGF2WvDM14pwqQdkyoQ,1276
|
41
41
|
nucliadb_utils/storages/storage.py,sha256=W8pDa5pXTvfDY5ugEPVESpnkpDE7hnj7jnQQaKdlXk8,20559
|
42
42
|
nucliadb_utils/tests/__init__.py,sha256=Oo9CAE7B0eW5VHn8sHd6o30SQzOWUhktLPRXdlDOleA,1456
|
43
|
-
nucliadb_utils/tests/asyncbenchmark.py,sha256=
|
43
|
+
nucliadb_utils/tests/asyncbenchmark.py,sha256=rN_NNDk4ras0qgFp0QlRyAi9ZU9xITdzxl2s5CigzBo,10698
|
44
44
|
nucliadb_utils/tests/conftest.py,sha256=gPYVuVhj_e6Aeanb91wvUerwuxZgaS7d3luIBRQFIU0,1876
|
45
45
|
nucliadb_utils/tests/gcs.py,sha256=1dbt_zG3uZPZDF3Nyrgrvi_bsKmafAUOm4Pu4bzt7wI,3098
|
46
46
|
nucliadb_utils/tests/indexing.py,sha256=YW2QhkhO9Q_8A4kKWJaWSvXvyQ_AiAwY1VylcfVQFxk,1513
|
@@ -57,14 +57,14 @@ nucliadb_utils/tests/unit/test_run.py,sha256=VHeojVBj_AfV_uNch9eEi4zCT-O94VKjwb_
|
|
57
57
|
nucliadb_utils/tests/unit/test_signals.py,sha256=Br3BjBZpAtKPqeSmfHSGf1Seu4mB2OBWFCgLcNEH0PQ,2647
|
58
58
|
nucliadb_utils/tests/unit/test_tests.py,sha256=-YHgVMKJr_3WYwrBj9TnwpVLIkP80PLZpWnvAIYvnz8,1189
|
59
59
|
nucliadb_utils/tests/unit/test_transaction.py,sha256=ULVALWbMWEkH2Gq5Q8olEL8k8Kqyh5RAe0Lp9qdF1V4,3917
|
60
|
-
nucliadb_utils/tests/unit/test_utilities.py,sha256=
|
60
|
+
nucliadb_utils/tests/unit/test_utilities.py,sha256=ngJSkqqr4XnFWcaRNb8hqsffEMx7KwZ2crMW7ALr8v4,5159
|
61
61
|
nucliadb_utils/tests/unit/storages/__init__.py,sha256=itSI7dtTwFP55YMX4iK7JzdMHS5CQVUiB1XzQu4UBh8,833
|
62
62
|
nucliadb_utils/tests/unit/storages/test_aws.py,sha256=GCsB_jwCUNV3Ogt8TZZEmNKAHvOlR0HGU7blrFbtJqs,1924
|
63
63
|
nucliadb_utils/tests/unit/storages/test_gcs.py,sha256=2XzJwgNpfjVGjtE-QdZhu3ayuT1EMEXINdM-_SatPCY,3554
|
64
64
|
nucliadb_utils/tests/unit/storages/test_pg.py,sha256=sJfUttMSzq8W1XYolAUcMxl_R5HcEzb5fpCklPeMJiY,17000
|
65
65
|
nucliadb_utils/tests/unit/storages/test_storage.py,sha256=VFpRq6Q6BjnIrBQCumYzR8DQUacwhxt5CzTKSlqqD24,6892
|
66
|
-
nucliadb_utils-3.1.0.
|
67
|
-
nucliadb_utils-3.1.0.
|
68
|
-
nucliadb_utils-3.1.0.
|
69
|
-
nucliadb_utils-3.1.0.
|
70
|
-
nucliadb_utils-3.1.0.
|
66
|
+
nucliadb_utils-3.1.0.post494.dist-info/METADATA,sha256=eBDbpICUtWDn0ylr52OHSDhhQ6vZEs8l9eCmhu6HuMY,1925
|
67
|
+
nucliadb_utils-3.1.0.post494.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
68
|
+
nucliadb_utils-3.1.0.post494.dist-info/top_level.txt,sha256=fE3vJtALTfgh7bcAWcNhcfXkNPp_eVVpbKK-2IYua3E,15
|
69
|
+
nucliadb_utils-3.1.0.post494.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
70
|
+
nucliadb_utils-3.1.0.post494.dist-info/RECORD,,
|
File without changes
|
{nucliadb_utils-3.1.0.post492.dist-info → nucliadb_utils-3.1.0.post494.dist-info}/top_level.txt
RENAMED
File without changes
|
File without changes
|