documente_shared 0.1.130__py3-none-any.whl → 0.1.131b0__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 documente_shared might be problematic. Click here for more details.
- documente_shared/application/query_params.py +0 -0
- documente_shared/domain/entities/document.py +9 -5
- documente_shared/domain/entities/scaling.py +6 -3
- {documente_shared-0.1.130.dist-info → documente_shared-0.1.131b0.dist-info}/METADATA +1 -1
- {documente_shared-0.1.130.dist-info → documente_shared-0.1.131b0.dist-info}/RECORD +5 -5
- {documente_shared-0.1.130.dist-info → documente_shared-0.1.131b0.dist-info}/WHEEL +0 -0
|
File without changes
|
|
@@ -27,7 +27,7 @@ class DocumentProcessing(object):
|
|
|
27
27
|
status: DocumentProcessingStatus
|
|
28
28
|
category: DocumentProcessingCategory
|
|
29
29
|
file_path: Optional[str] = None
|
|
30
|
-
|
|
30
|
+
file_auxiliar_path: Optional[str] = None
|
|
31
31
|
file_bytes: Optional[bytes] = None
|
|
32
32
|
sub_category: Optional[DocumentProcessingSubCategory] = None
|
|
33
33
|
uploaded_from: Optional[DocumentProcessingSource] = None
|
|
@@ -49,6 +49,7 @@ class DocumentProcessing(object):
|
|
|
49
49
|
feedback: Optional[list | dict] = None
|
|
50
50
|
completed_at: Optional[datetime] = None
|
|
51
51
|
metadata: Optional[dict] = None
|
|
52
|
+
document_size: Optional[Decimal] = None
|
|
52
53
|
metadata_items: Optional[List[DocumentProcessingMetadata]] = None
|
|
53
54
|
|
|
54
55
|
def __post_init__(self):
|
|
@@ -229,7 +230,7 @@ class DocumentProcessing(object):
|
|
|
229
230
|
self.digest == other.digest
|
|
230
231
|
and self.status == other.status
|
|
231
232
|
and self.file_path == other.file_path
|
|
232
|
-
and self.
|
|
233
|
+
and self.file_auxiliar_path == other.file_auxiliar_path
|
|
233
234
|
and self.issued_at == other.issued_at
|
|
234
235
|
and self.uploaded_at == other.uploaded_at
|
|
235
236
|
and self.enqueued_at == other.enqueued_at
|
|
@@ -244,7 +245,7 @@ class DocumentProcessing(object):
|
|
|
244
245
|
'digest': self.digest,
|
|
245
246
|
'status': str(self.status),
|
|
246
247
|
'file_path': self.file_path,
|
|
247
|
-
'
|
|
248
|
+
'file_auxiliar_path': self.file_auxiliar_path,
|
|
248
249
|
'category': (
|
|
249
250
|
str(self.category)
|
|
250
251
|
if self.category else None
|
|
@@ -279,6 +280,7 @@ class DocumentProcessing(object):
|
|
|
279
280
|
'metadata': self.metadata,
|
|
280
281
|
'completed_at': self.completed_at.isoformat() if self.completed_at else None,
|
|
281
282
|
'metadata_items': [metadata.to_dict for metadata in self.metadata_items],
|
|
283
|
+
'document_size': self.document_size,
|
|
282
284
|
}
|
|
283
285
|
|
|
284
286
|
@property
|
|
@@ -301,7 +303,7 @@ class DocumentProcessing(object):
|
|
|
301
303
|
'status',
|
|
302
304
|
'metadata',
|
|
303
305
|
'file_path',
|
|
304
|
-
'
|
|
306
|
+
'file_auxiliar_path',
|
|
305
307
|
'file_bytes',
|
|
306
308
|
'category',
|
|
307
309
|
'sub_category',
|
|
@@ -324,6 +326,7 @@ class DocumentProcessing(object):
|
|
|
324
326
|
'failed_reason',
|
|
325
327
|
'feedback',
|
|
326
328
|
'metadata',
|
|
329
|
+
'document_size',
|
|
327
330
|
'completed_at',
|
|
328
331
|
]
|
|
329
332
|
for _property in instance_properties:
|
|
@@ -339,7 +342,7 @@ class DocumentProcessing(object):
|
|
|
339
342
|
digest=data.get('digest'),
|
|
340
343
|
status=DocumentProcessingStatus.from_value(data.get('status')),
|
|
341
344
|
file_path=data.get('file_path'),
|
|
342
|
-
|
|
345
|
+
file_auxiliar_path=data.get('file_auxiliar_path'),
|
|
343
346
|
category=(
|
|
344
347
|
DocumentProcessingCategory.from_value(data.get('category'))
|
|
345
348
|
if data.get('category') else None
|
|
@@ -377,5 +380,6 @@ class DocumentProcessing(object):
|
|
|
377
380
|
DocumentProcessingMetadata.from_dict(metadata)
|
|
378
381
|
for metadata in data.get('metadata_items', [])
|
|
379
382
|
],
|
|
383
|
+
document_size=data.get('document_size'),
|
|
380
384
|
)
|
|
381
385
|
|
|
@@ -4,14 +4,16 @@ from typing import Optional
|
|
|
4
4
|
|
|
5
5
|
@dataclass
|
|
6
6
|
class ScalingRequirements(object):
|
|
7
|
-
|
|
7
|
+
lg_documents: Optional[int] = 0
|
|
8
|
+
md_documents: Optional[int] = 0
|
|
8
9
|
processing_cases: Optional[int] = 0
|
|
9
10
|
processing_case_items: Optional[int] = 0
|
|
10
11
|
|
|
11
12
|
@property
|
|
12
13
|
def to_dict(self):
|
|
13
14
|
return {
|
|
14
|
-
"
|
|
15
|
+
"lg_documents": self.lg_documents,
|
|
16
|
+
"md_documents": self.md_documents,
|
|
15
17
|
"processing_cases": self.processing_cases,
|
|
16
18
|
"processing_case_items": self.processing_case_items,
|
|
17
19
|
}
|
|
@@ -19,7 +21,8 @@ class ScalingRequirements(object):
|
|
|
19
21
|
@classmethod
|
|
20
22
|
def from_dict(cls, data: dict) -> "ScalingRequirements":
|
|
21
23
|
return cls(
|
|
22
|
-
|
|
24
|
+
lg_documents=data.get("lg_documents", 0),
|
|
25
|
+
md_documents=data.get("md_documents", 0),
|
|
23
26
|
processing_cases=data.get("processing_cases", 0),
|
|
24
27
|
processing_case_items=data.get("processing_case_items", 0),
|
|
25
28
|
)
|
|
@@ -14,7 +14,7 @@ documente_shared/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
|
|
|
14
14
|
documente_shared/domain/base_enum.py,sha256=DojAfn-zQdtjtImeHUpBzE6TBTm07XrbMOdW3h8RVd8,1449
|
|
15
15
|
documente_shared/domain/constants.py,sha256=NG5BGaXBr_FnzudjTRPxpDpyiSDdaB_PLCdlYlFUQeU,187
|
|
16
16
|
documente_shared/domain/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
documente_shared/domain/entities/document.py,sha256=
|
|
17
|
+
documente_shared/domain/entities/document.py,sha256=iSXUjq7JZXZy16XkS6x4winmsds1rKtuLDshQ8cpOy8,13639
|
|
18
18
|
documente_shared/domain/entities/document_metadata.py,sha256=ygyFIC5qwxlm8DUM5kvVFny9zJfPQS8vNLM2br5XsQ8,2353
|
|
19
19
|
documente_shared/domain/entities/in_memory_document.py,sha256=6LlUtF9YbFPNxP-ytrWkFYQzvdJJJ9iC8X4_U125hEE,2113
|
|
20
20
|
documente_shared/domain/entities/processing_case.py,sha256=D57zP704mBtt563Pbmd41PFQSna4chVWsWTR_2ZAtTU,6602
|
|
@@ -23,7 +23,7 @@ documente_shared/domain/entities/processing_case_item.py,sha256=IN46jCGIv_DXEp1H
|
|
|
23
23
|
documente_shared/domain/entities/processing_case_item_filters.py,sha256=R_AvDCB496Lww1qn2OwtltqULKE3IpcJB0ejnmRkg7Q,2009
|
|
24
24
|
documente_shared/domain/entities/processing_documents.py,sha256=YYuTkdCNkqlO8cA0onJsZYtstxGt9M5NMuIO_87lB14,352
|
|
25
25
|
documente_shared/domain/entities/processing_event.py,sha256=sejo9eM4A6fDDFq3qCX3V1GMGwQVUh_5oJaPDiUwpoc,2350
|
|
26
|
-
documente_shared/domain/entities/scaling.py,sha256=
|
|
26
|
+
documente_shared/domain/entities/scaling.py,sha256=DPOE_W4NZ903cyNckmDPus_sYWEZfnvn5ar3Zf5JM3Q,897
|
|
27
27
|
documente_shared/domain/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
documente_shared/domain/enums/common.py,sha256=tgM098gKYHCp8LVNA6FKd-O_Meoi0Cx_UjQ3OKLxGYY,3127
|
|
29
29
|
documente_shared/domain/enums/document.py,sha256=QwvckW-VJBSujllIVloKlZUh1pI5UnX4oueYbV5CYGw,3205
|
|
@@ -55,6 +55,6 @@ documente_shared/infrastructure/services/http_scaling.py,sha256=cIo-61nfIwbtO86E
|
|
|
55
55
|
documente_shared/infrastructure/sqs_queue.py,sha256=KZWeHZ9zmXmrxoNpOQX7GEdDhZ1knbPXgwSwFwJblGg,1504
|
|
56
56
|
documente_shared/presentation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
57
|
documente_shared/presentation/presenters.py,sha256=GGAEwefmjCIVepsUA2oZOVLxXbhhiISPM0Jgt6dT6O0,423
|
|
58
|
-
documente_shared-0.1.
|
|
59
|
-
documente_shared-0.1.
|
|
60
|
-
documente_shared-0.1.
|
|
58
|
+
documente_shared-0.1.131b0.dist-info/METADATA,sha256=Kkbe3-Zno-bRxBr53A4ce3f1oFFlQIULOsInpEcyNfs,965
|
|
59
|
+
documente_shared-0.1.131b0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
60
|
+
documente_shared-0.1.131b0.dist-info/RECORD,,
|
|
File without changes
|