documente_shared 0.1.51__py3-none-any.whl → 0.1.53__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.

@@ -33,6 +33,7 @@ class DocumentProcessing(object):
33
33
  processed_json_bytes: Optional[bytes] = None
34
34
  processed_metadata_path: Optional[str] = None
35
35
  processing_time: Optional[Decimal] = None
36
+ processing_accuracy: Optional[Decimal] = None
36
37
  issued_at: Optional[datetime] = None
37
38
  uploaded_at: Optional[datetime] = None
38
39
  enqueued_at: Optional[datetime] = None
@@ -64,7 +65,11 @@ class DocumentProcessing(object):
64
65
  @property
65
66
  def is_failed(self) -> bool:
66
67
  return self.status == DocumentProcessingStatus.FAILED
67
-
68
+
69
+ @property
70
+ def is_inreview(self) -> bool:
71
+ return self.status == DocumentProcessingStatus.IN_REVIEW
72
+
68
73
  @property
69
74
  def is_valid(self) -> bool:
70
75
  return all([
@@ -103,7 +108,10 @@ class DocumentProcessing(object):
103
108
 
104
109
  def deleted(self):
105
110
  self.status = DocumentProcessingStatus.DELETED
106
-
111
+
112
+ def in_review(self):
113
+ self.status = DocumentProcessingStatus.IN_REVIEW
114
+
107
115
  @property
108
116
  def file_key(self) -> str:
109
117
  return remove_slash_from_path(self.file_path)
@@ -172,6 +180,10 @@ class DocumentProcessing(object):
172
180
  str(self.processing_time.quantize(Decimal('0.00001')))
173
181
  if self.processing_time else None
174
182
  ),
183
+ 'processing_accuracy': (
184
+ str(self.processing_accuracy.quantize(Decimal('0.00001')))
185
+ if self.processing_accuracy else None
186
+ ),
175
187
  'issued_at': self.issued_at.isoformat() if self.issued_at else None,
176
188
  'uploaded_at': self.uploaded_at.isoformat() if self.uploaded_at else None,
177
189
  'enqueued_at': self.enqueued_at.isoformat() if self.enqueued_at else None,
@@ -209,6 +221,7 @@ class DocumentProcessing(object):
209
221
  'processed_metadata_path',
210
222
  'processed_metadata_bytes',
211
223
  'processing_time',
224
+ 'processing_accuracy',
212
225
  'issued_at',
213
226
  'uploaded_at',
214
227
  'enqueued_at',
@@ -246,6 +259,10 @@ class DocumentProcessing(object):
246
259
  Decimal(data.get('processing_time'))
247
260
  if data.get('processing_time') else None
248
261
  ),
262
+ processing_accuracy=(
263
+ Decimal(data.get('processing_accuracy'))
264
+ if data.get('processing_accuracy') else None
265
+ ),
249
266
  issued_at=get_datetime_from_data(input_datetime=data.get('issued_at')),
250
267
  uploaded_at=get_datetime_from_data(input_datetime=data.get('uploaded_at')),
251
268
  enqueued_at=get_datetime_from_data(input_datetime=data.get('enqueued_at')),
@@ -9,7 +9,7 @@ class DocumentProcessingStatus(BaseEnum):
9
9
  FAILED = 'FAILED'
10
10
  DELETED = 'DELETED'
11
11
  CANCELLED = 'CANCELLED'
12
-
12
+ IN_REVIEW = 'IN_REVIEW'
13
13
 
14
14
  class DocumentProcessingCategory(BaseEnum):
15
15
  CIRCULAR = 'CIRCULAR'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.51
3
+ Version: 0.1.53
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -8,15 +8,15 @@ documente_shared/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
8
8
  documente_shared/domain/base_enum.py,sha256=DojAfn-zQdtjtImeHUpBzE6TBTm07XrbMOdW3h8RVd8,1449
9
9
  documente_shared/domain/constants.py,sha256=jOlMKFq12FgiYMJcQHku8IVwuOE5t-HEPuSV_zEeIFo,56
10
10
  documente_shared/domain/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- documente_shared/domain/entities/document.py,sha256=EMltckX1zCJ2JtGWOihzLZc9pJFtdbDJy9uEWrgmsnA,9464
11
+ documente_shared/domain/entities/document.py,sha256=X8uEw7TCy5o87-kscok2CcH67exsE6BrRqs6L-SvuTg,10111
12
12
  documente_shared/domain/entities/document_metadata.py,sha256=Oa-c0xJODXaGtFkNxt9k86rSWGxY2LHVDOgu9tQxCGY,2354
13
- documente_shared/domain/enums.py,sha256=l-u_Zka8TW5mpMabymtEkBCEdavermKZwPLY_hALJww,899
13
+ documente_shared/domain/enums.py,sha256=EA8RsuusX065Isp8qUTv9TPpWPkae6mbIC-yYENrkow,926
14
14
  documente_shared/domain/repositories.py,sha256=g3qLUy2kT8esmvU4VxxSVnDaXeySKKQ7mUvIvxOwh9A,757
15
15
  documente_shared/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  documente_shared/infrastructure/dynamo_repositories.py,sha256=SEad_HLppp2h_BKDSzb9oo1VlAVRZWelOPvJPlDwbzQ,1453
17
17
  documente_shared/infrastructure/dynamo_table.py,sha256=dK05KgFvIYCmOdMpq9-OV_OBrP6cCngiUikCJrxlwt4,2112
18
18
  documente_shared/infrastructure/s3_bucket.py,sha256=vT_yN42RFQXubtUn8ln-j13Os_-25UGClVtXg5Bkv6I,1932
19
19
  documente_shared/infrastructure/sqs_queue.py,sha256=PSiTAnjXvQ-W-9mzLpH2UjbQJTvYkMiaxNaMecF-cR4,1505
20
- documente_shared-0.1.51.dist-info/METADATA,sha256=taAnvSh9EPgH53aMUXLGUvb6OTXwdtWRESjgq2o_s9g,682
21
- documente_shared-0.1.51.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
- documente_shared-0.1.51.dist-info/RECORD,,
20
+ documente_shared-0.1.53.dist-info/METADATA,sha256=YwiTf7bf9WN1W8EHneItNhtPY9hWxT1a_qN2YVsu0Rg,682
21
+ documente_shared-0.1.53.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
22
+ documente_shared-0.1.53.dist-info/RECORD,,