assemblyline-v4-service 4.5.0.64__py3-none-any.whl → 4.5.0.65__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.
Potentially problematic release.
This version of assemblyline-v4-service might be problematic. Click here for more details.
- assemblyline_v4_service/VERSION +1 -1
- assemblyline_v4_service/common/request.py +3 -0
- assemblyline_v4_service/common/task.py +6 -1
- {assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/METADATA +1 -1
- {assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/RECORD +10 -10
- test/test_common/test_request.py +2 -2
- test/test_common/test_task.py +3 -1
- {assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/LICENCE.md +0 -0
- {assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/WHEEL +0 -0
- {assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/top_level.txt +0 -0
assemblyline_v4_service/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.5.0.
|
|
1
|
+
4.5.0.65
|
|
@@ -70,7 +70,8 @@ class Task:
|
|
|
70
70
|
self.min_classification = task.min_classification.value
|
|
71
71
|
self.max_extracted = task.max_files
|
|
72
72
|
self.metadata = task.metadata
|
|
73
|
-
self.
|
|
73
|
+
self.partial_result: bool = False
|
|
74
|
+
self.result: Result = Result()
|
|
74
75
|
self.safelist_config: Dict[str, Any] = task.safelist_config
|
|
75
76
|
self.service_config: Dict[str, Any] = dict(task.service_config)
|
|
76
77
|
self.service_context: Optional[str] = None
|
|
@@ -263,11 +264,15 @@ class Task:
|
|
|
263
264
|
type=self.file_type,
|
|
264
265
|
size=self.file_size,
|
|
265
266
|
drop_file=self.drop_file,
|
|
267
|
+
partial=self.partial_result,
|
|
266
268
|
temp_submission_data=self.temp_submission_data,
|
|
267
269
|
)
|
|
268
270
|
|
|
269
271
|
return result
|
|
270
272
|
|
|
273
|
+
def partial(self) -> None:
|
|
274
|
+
self.partial_result = True
|
|
275
|
+
|
|
271
276
|
def save_error(self, stack_info: str, recoverable: bool) -> None:
|
|
272
277
|
self.error_message = stack_info
|
|
273
278
|
|
{assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_v4_service/VERSION,sha256=
|
|
1
|
+
assemblyline_v4_service/VERSION,sha256=E_iXl-HgK7HYS4gbsgYeSgzQd02MgKgmBaFYBaE-HBY,9
|
|
2
2
|
assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
assemblyline_v4_service/healthz.py,sha256=3QGBg0EZuXC6UN411HFwpLNEop9UvS9feFhvBUTP-k4,1576
|
|
4
4
|
assemblyline_v4_service/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -10,9 +10,9 @@ assemblyline_v4_service/common/base.py,sha256=4rnK_183qsSfkRkuVp_0wy-haW49umx4jJ
|
|
|
10
10
|
assemblyline_v4_service/common/helper.py,sha256=xs9quuf-M1JOdKieBqOmWaOece0CtzXFhhe85xQYmuY,3289
|
|
11
11
|
assemblyline_v4_service/common/ocr.py,sha256=3fV0PyY3oui_ucAM9dkolP0VRYKACKJuGY4M64DudIE,8841
|
|
12
12
|
assemblyline_v4_service/common/ontology_helper.py,sha256=9Ad81qbddg_pRMupT8o_KzxbKgpodaRqpc3mPoEKLtw,8494
|
|
13
|
-
assemblyline_v4_service/common/request.py,sha256=
|
|
13
|
+
assemblyline_v4_service/common/request.py,sha256=W7fqC2xQE3i5i2jlCDyUDp3ZqJQQqSshNW0mQfJMkFg,11792
|
|
14
14
|
assemblyline_v4_service/common/result.py,sha256=9AqM6qCYiia_Bpyn_fBFhzNQMcqJbtFSiGjp57fXW2E,32713
|
|
15
|
-
assemblyline_v4_service/common/task.py,sha256=
|
|
15
|
+
assemblyline_v4_service/common/task.py,sha256=dJsvRpW0x88CCF_LW6w87jQ_UKTVaOs2Gb117IDNiU8,14233
|
|
16
16
|
assemblyline_v4_service/common/utils.py,sha256=k2__d-V5LjB6o2IKbjVe7tJWKcKuUHto5TyT5oKhIa0,3890
|
|
17
17
|
assemblyline_v4_service/dev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
assemblyline_v4_service/dev/run_service_once.py,sha256=cGwsNGWNp5KcZ4iVqMf76uGHR21faYhpEkEclMwEdcI,10505
|
|
@@ -34,12 +34,12 @@ test/test_common/test_base.py,sha256=fuJSSlPxIDHq6HU1xbvaMFitw2z1spOZNHD2SJ4UUic
|
|
|
34
34
|
test/test_common/test_helper.py,sha256=sO6YAiBhKTqaxlpLhFYDuy2ZdbuF2cg07Ylzo83ZzQs,2575
|
|
35
35
|
test/test_common/test_ocr.py,sha256=mt_PgElgwQKJmNrp2nRVx9NjfMedVk40I6IV317vATI,1753
|
|
36
36
|
test/test_common/test_ontology_helper.py,sha256=Q9-Eqeo8Ih7XlbFmlUAXCtgnfW8JCDqqlYFb56077h4,10331
|
|
37
|
-
test/test_common/test_request.py,sha256=
|
|
37
|
+
test/test_common/test_request.py,sha256=Ceyds8BNO1O0f1kH1VEb84faJcaupvSjVKIrGdHexsc,11842
|
|
38
38
|
test/test_common/test_result.py,sha256=6BiOKxEPrKBjOY44jv3TY-yiXm0qI1ok_CZBnjP9TM4,45447
|
|
39
|
-
test/test_common/test_task.py,sha256=
|
|
39
|
+
test/test_common/test_task.py,sha256=P44mNcSe-3tJgDk9ppN3KbM7oN4LBVIuhONG-Gveh74,19007
|
|
40
40
|
test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
|
|
41
|
-
assemblyline_v4_service-4.5.0.
|
|
42
|
-
assemblyline_v4_service-4.5.0.
|
|
43
|
-
assemblyline_v4_service-4.5.0.
|
|
44
|
-
assemblyline_v4_service-4.5.0.
|
|
45
|
-
assemblyline_v4_service-4.5.0.
|
|
41
|
+
assemblyline_v4_service-4.5.0.65.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
42
|
+
assemblyline_v4_service-4.5.0.65.dist-info/METADATA,sha256=VaZWzEvbw3Z8prRUZRUoezm7jQ3zTFEogDAziAmDVV0,9489
|
|
43
|
+
assemblyline_v4_service-4.5.0.65.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
44
|
+
assemblyline_v4_service-4.5.0.65.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
|
|
45
|
+
assemblyline_v4_service-4.5.0.65.dist-info/RECORD,,
|
test/test_common/test_request.py
CHANGED
|
@@ -5,7 +5,7 @@ from test.test_common import TESSERACT_LIST, setup_module
|
|
|
5
5
|
|
|
6
6
|
import pytest
|
|
7
7
|
from assemblyline_v4_service.common.request import ServiceRequest
|
|
8
|
-
from assemblyline_v4_service.common.result import get_heuristic_primitives
|
|
8
|
+
from assemblyline_v4_service.common.result import Result, get_heuristic_primitives
|
|
9
9
|
from assemblyline_v4_service.common.task import MaxExtractedExceeded, Task
|
|
10
10
|
|
|
11
11
|
from assemblyline.odm.messages.task import Task as ServiceTask
|
|
@@ -303,7 +303,7 @@ def test_get_param(service_request):
|
|
|
303
303
|
|
|
304
304
|
|
|
305
305
|
def test_result_getter(service_request):
|
|
306
|
-
assert service_request.result
|
|
306
|
+
assert isinstance(service_request.result, Result)
|
|
307
307
|
|
|
308
308
|
|
|
309
309
|
def test_result_setter(service_request):
|
test/test_common/test_task.py
CHANGED
|
@@ -61,7 +61,6 @@ def test_task_init(servicetask):
|
|
|
61
61
|
assert t.metadata == {}
|
|
62
62
|
assert t.md5 == "d41d8cd98f00b204e9800998ecf8427e"
|
|
63
63
|
assert t.mime is None
|
|
64
|
-
assert t.result is None
|
|
65
64
|
assert isinstance(t.safelist_config, ServiceSafelist)
|
|
66
65
|
assert t.service_config == {}
|
|
67
66
|
assert t.service_context is None
|
|
@@ -380,6 +379,7 @@ def test_task_get_service_result(servicetask):
|
|
|
380
379
|
"service_debug_info": None,
|
|
381
380
|
},
|
|
382
381
|
"result": {"score": 0, "sections": []},
|
|
382
|
+
"partial": False,
|
|
383
383
|
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
384
384
|
"type": "text/plain",
|
|
385
385
|
"size": 0,
|
|
@@ -423,6 +423,7 @@ def test_task_get_service_result(servicetask):
|
|
|
423
423
|
"result": {
|
|
424
424
|
"score": 0,
|
|
425
425
|
},
|
|
426
|
+
"partial": False,
|
|
426
427
|
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
427
428
|
"type": "text/plain",
|
|
428
429
|
"size": 0,
|
|
@@ -486,6 +487,7 @@ def test_task_save_result(servicetask):
|
|
|
486
487
|
"service_debug_info": None,
|
|
487
488
|
},
|
|
488
489
|
"result": {"score": 0, "sections": []},
|
|
490
|
+
"partial": False,
|
|
489
491
|
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
490
492
|
"type": "text/plain",
|
|
491
493
|
"size": 0,
|
{assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/LICENCE.md
RENAMED
|
File without changes
|
{assemblyline_v4_service-4.5.0.64.dist-info → assemblyline_v4_service-4.5.0.65.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|