documente_shared 0.1.43__tar.gz → 0.1.45__tar.gz

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.

Files changed (20) hide show
  1. {documente_shared-0.1.43 → documente_shared-0.1.45}/PKG-INFO +3 -3
  2. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/entities/document_process.py +33 -4
  3. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/enums.py +4 -0
  4. {documente_shared-0.1.43 → documente_shared-0.1.45}/pyproject.toml +3 -3
  5. {documente_shared-0.1.43 → documente_shared-0.1.45}/README.md +0 -0
  6. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/__init__.py +0 -0
  7. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/application/__init__.py +0 -0
  8. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/application/digest.py +0 -0
  9. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/application/exceptions.py +0 -0
  10. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/application/time_utils.py +0 -0
  11. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/__init__.py +0 -0
  12. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/base_enum.py +0 -0
  13. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/entities/__init__.py +0 -0
  14. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/entities/document_process_metadata.py +0 -0
  15. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/domain/repositories.py +0 -0
  16. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/infrastructure/__init__.py +0 -0
  17. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/infrastructure/dynamo_repositories.py +0 -0
  18. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/infrastructure/dynamo_table.py +0 -0
  19. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/infrastructure/s3_bucket.py +0 -0
  20. {documente_shared-0.1.43 → documente_shared-0.1.45}/documente_shared/infrastructure/sqs_queue.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: documente_shared
3
- Version: 0.1.43
3
+ Version: 0.1.45
4
4
  Summary: Shared utilities for Documente AI projects
5
5
  License: MIT
6
6
  Author: Tech
@@ -11,8 +11,8 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
- Requires-Dist: boto3 (>=1.34.102,<2.0.0)
15
- Requires-Dist: botocore (>=1.34.102,<2.0.0)
14
+ Requires-Dist: boto3 (>=1.34.80,<2.0.0)
15
+ Requires-Dist: botocore (>=1.34.80,<2.0.0)
16
16
  Requires-Dist: sentry-sdk (>=2.19.2,<3.0.0)
17
17
  Description-Content-Type: text/markdown
18
18
 
@@ -28,8 +28,11 @@ class DocumentProcess(object):
28
28
  processed_csv_bytes: Optional[bytes] = None
29
29
  processed_xlsx_path: Optional[str] = None
30
30
  processed_xlsx_bytes: Optional[bytes] = None
31
+ processed_json_path: Optional[str] = None
32
+ processed_json_bytes: Optional[bytes] = None
31
33
  processed_metadata_path: Optional[str] = None
32
34
  processing_time: Optional[Decimal] = None
35
+ issued_at: Optional[datetime] = None
33
36
  uploaded_at: Optional[datetime] = None
34
37
  enqueued_at: Optional[datetime] = None
35
38
  started_at: Optional[datetime] = None
@@ -108,6 +111,10 @@ class DocumentProcess(object):
108
111
  def processed_xlsx_key(self) -> str:
109
112
  return remove_slash_from_path(self.processed_xlsx_path)
110
113
 
114
+ @property
115
+ def processed_json_key(self) -> str:
116
+ return remove_slash_from_path(self.processed_json_path)
117
+
111
118
  @property
112
119
  def processed_metadata_key(self) -> str:
113
120
  return remove_slash_from_path(self.processed_metadata_path)
@@ -129,6 +136,7 @@ class DocumentProcess(object):
129
136
  self.digest == other.digest
130
137
  and self.status == other.status
131
138
  and self.file_path == other.file_path
139
+ and self.issued_at == other.issued_at
132
140
  and self.uploaded_at == other.uploaded_at
133
141
  and self.enqueued_at == other.enqueued_at
134
142
  and self.started_at == other.started_at
@@ -153,11 +161,13 @@ class DocumentProcess(object):
153
161
  ),
154
162
  'processed_csv_path': self.processed_csv_path,
155
163
  'processed_xlsx_path': self.processed_xlsx_path,
164
+ 'processed_json_path': self.processed_json_path,
156
165
  'processed_metadata_path': self.processed_metadata_path,
157
166
  'processing_time': (
158
167
  str(self.processing_time.quantize(Decimal('0.00001')))
159
168
  if self.processing_time else None
160
169
  ),
170
+ 'issued_at': self.issued_at.isoformat() if self.issued_at else None,
161
171
  'uploaded_at': self.uploaded_at.isoformat() if self.uploaded_at else None,
162
172
  'enqueued_at': self.enqueued_at.isoformat() if self.enqueued_at else None,
163
173
  'started_at': self.started_at.isoformat() if self.started_at else None,
@@ -179,10 +189,27 @@ class DocumentProcess(object):
179
189
  properties: List[str] = None,
180
190
  ):
181
191
  instance_properties = properties or [
182
- 'status', 'metadata', 'file_path', 'file_bytes', 'category', 'sub_category',
183
- 'processed_csv_path', 'processed_csv_bytes', 'processed_xlsx_path', 'processed_metadata_path',
184
- 'processed_xlsx_bytes', 'processing_time', 'uploaded_at',
185
- 'enqueued_at', 'started_at', 'failed_at', 'failed_reason', 'completed_at',
192
+ 'status',
193
+ 'metadata',
194
+ 'file_path',
195
+ 'file_bytes',
196
+ 'category',
197
+ 'sub_category',
198
+ 'processed_csv_path',
199
+ 'processed_csv_bytes',
200
+ 'processed_xlsx_path',
201
+ 'processed_xlsx_bytes',
202
+ 'processed_json_path',
203
+ 'processed_json_bytes',
204
+ 'processed_metadata_path',
205
+ 'processing_time',
206
+ 'issued_at',
207
+ 'uploaded_at',
208
+ 'enqueued_at',
209
+ 'started_at',
210
+ 'failed_at',
211
+ 'failed_reason',
212
+ 'completed_at',
186
213
  ]
187
214
  for _property in instance_properties:
188
215
  property_value = getattr(new_instance, _property)
@@ -207,11 +234,13 @@ class DocumentProcess(object):
207
234
  ),
208
235
  processed_csv_path=data.get('processed_csv_path'),
209
236
  processed_xlsx_path=data.get('processed_xlsx_path'),
237
+ processed_json_path=data.get('processed_json_path'),
210
238
  processed_metadata_path=data.get('processed_metadata_path'),
211
239
  processing_time=(
212
240
  Decimal(data.get('processing_time'))
213
241
  if data.get('processing_time') else None
214
242
  ),
243
+ issued_at=get_datetime_from_data(input_datetime=data.get('issued_at')),
215
244
  uploaded_at=get_datetime_from_data(input_datetime=data.get('uploaded_at')),
216
245
  enqueued_at=get_datetime_from_data(input_datetime=data.get('enqueued_at')),
217
246
  started_at=get_datetime_from_data(input_datetime=data.get('started_at')),
@@ -13,6 +13,7 @@ class DocumentProcessStatus(BaseEnum):
13
13
 
14
14
  class DocumentProcessCategory(BaseEnum):
15
15
  CIRCULAR = 'CIRCULAR'
16
+ DESGRAVAMEN = 'DESGRAVAMEN'
16
17
 
17
18
 
18
19
  class DocumentProcessSubCategory(BaseEnum):
@@ -22,3 +23,6 @@ class DocumentProcessSubCategory(BaseEnum):
22
23
  CC_INFORMATIVA = 'CC_INFORMATIVA'
23
24
  CC_RETENCION_SUSPENSION_REMISION = 'CC_RETENCION_SUSPENSION_REMISION'
24
25
 
26
+ # Desgravamenes
27
+ DS_CREDISEGUROS = 'DS_CREDISEGUROS'
28
+
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "documente_shared"
3
- version = "0.1.43"
3
+ version = "0.1.45"
4
4
  description = "Shared utilities for Documente AI projects"
5
5
  authors = ["Tech <tech@llamitai.com>"]
6
6
  license = "MIT"
@@ -8,8 +8,8 @@ readme = "README.md"
8
8
 
9
9
  [tool.poetry.dependencies]
10
10
  python = ">=3.10,<3.13"
11
- boto3 = "^1.34.102"
12
- botocore = "^1.34.102"
11
+ boto3 = "^1.34.80"
12
+ botocore = "^1.34.80"
13
13
  sentry-sdk = "^2.19.2"
14
14
 
15
15
  [tool.poetry.dev-dependencies]