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

@@ -4,7 +4,11 @@ from datetime import datetime, tzinfo
4
4
  from decimal import Decimal
5
5
  from typing import Optional, List
6
6
 
7
- from documente_shared.application.files import remove_slash_from_path, get_filename_from_path, remove_extension
7
+ from documente_shared.application.files import (
8
+ remove_slash_from_path,
9
+ get_filename_from_path,
10
+ remove_extension,
11
+ )
8
12
  from documente_shared.application.numbers import normalize_number
9
13
  from documente_shared.application.time_utils import get_datetime_from_data
10
14
  from documente_shared.domain.constants import la_paz_tz
@@ -138,6 +142,8 @@ class DocumentProcessing(object):
138
142
 
139
143
  @property
140
144
  def extended_filename(self) -> str:
145
+ if not self.file_path:
146
+ return ''
141
147
  return self.file_path.split('/')[-1]
142
148
 
143
149
  @property
@@ -17,6 +17,7 @@ class ProcessingCaseItem(object):
17
17
  case_id: str
18
18
  digest: str
19
19
  status: ProcessingStatus
20
+ name: Optional[str] = None
20
21
  document: Optional[InMemoryDocument] = None
21
22
  document_type: Optional[ProcessingDocumentType] = None
22
23
  uploaded_from: Optional[ProcessingSource] = None
@@ -92,6 +93,7 @@ class ProcessingCaseItem(object):
92
93
  ):
93
94
  instance_properties = properties or [
94
95
  'status',
96
+ 'name',
95
97
  'document',
96
98
  'document_type',
97
99
  'uploaded_from',
@@ -153,6 +155,7 @@ class ProcessingCaseItem(object):
153
155
  'case_id': self.case_id,
154
156
  'digest': self.digest,
155
157
  'status': str(self.status),
158
+ 'name': self.name,
156
159
  'document':(
157
160
  self.document.to_dict
158
161
  if self.document else None
@@ -242,6 +245,7 @@ class ProcessingCaseItem(object):
242
245
  case_id=data.get('case_id'),
243
246
  digest=data.get('digest'),
244
247
  status=ProcessingStatus.from_value(data.get('status')),
248
+ name=data.get('name'),
245
249
  document=(
246
250
  InMemoryDocument.from_dict(data.get('document'))
247
251
  if data.get('document') else None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.127
3
+ Version: 0.1.129
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -14,12 +14,12 @@ 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=JL-EmqHx3PtPIcVbnhM1lTVjqTTPTALinuScFy4I_ZY,13125
17
+ documente_shared/domain/entities/document.py,sha256=5QCHvr99Jh7TDrRSUqseeeGlXRtRoPXeXuGLN0paLik,13195
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
21
21
  documente_shared/domain/entities/processing_case_filters.py,sha256=harKyu7QEuL1bI_Z8_UxkVCMo5r9vHeNHyi_Ja07vjs,1953
22
- documente_shared/domain/entities/processing_case_item.py,sha256=XyHCVCOoZawTw70_LyEiLBmWCTV4ScXBmKHjmZoEzuA,10469
22
+ documente_shared/domain/entities/processing_case_item.py,sha256=IN46jCGIv_DXEp1HQbqZiDteVS2UzEob7WLS4VXft1s,10586
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
@@ -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.127.dist-info/METADATA,sha256=T8JPaBs90JvtEXk8cPK3ccAddHu9l6hRPE8Voh5Jxto,963
59
- documente_shared-0.1.127.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
60
- documente_shared-0.1.127.dist-info/RECORD,,
58
+ documente_shared-0.1.129.dist-info/METADATA,sha256=DTI1j08IWhuCuRBbJSDgHHmyVIKGOKEwaJu3IIqm-eM,963
59
+ documente_shared-0.1.129.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
60
+ documente_shared-0.1.129.dist-info/RECORD,,