documente_shared 0.1.104__tar.gz → 0.1.106__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.
- {documente_shared-0.1.104 → documente_shared-0.1.106}/PKG-INFO +1 -1
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/files.py +5 -0
- documente_shared-0.1.106/documente_shared/application/numbers.py +7 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/document.py +8 -3
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/in_memory_document.py +5 -1
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/processing_case_item.py +3 -2
- {documente_shared-0.1.104 → documente_shared-0.1.106}/pyproject.toml +1 -1
- {documente_shared-0.1.104 → documente_shared-0.1.106}/README.md +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/dates.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/json.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/payloads.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/query_params.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/processing_case.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/processing_case_filters.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/processing_case_item_filters.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/processing_documents.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/processing_event.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/scaling.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/common.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/exceptions.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/interfaces/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/interfaces/scaling.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/repositories/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/repositories/document.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/repositories/processing_case.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/repositories/processing_case_item.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/documente_client.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/lambdas.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/dynamo_document.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/dynamo_processing_case.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/http_document_processing.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/http_processing_case.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/http_processing_case_item.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/mem_document.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/mem_processing_case.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/repositories/mem_processing_case_item.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/services/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/services/http_scaling.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/sqs_queue.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/presentation/__init__.py +0 -0
- {documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/presentation/presenters.py +0 -0
|
@@ -20,3 +20,8 @@ def remove_slash_from_path(file_path: str) -> str:
|
|
|
20
20
|
if file_path and file_path.startswith('/'):
|
|
21
21
|
return file_path[1:]
|
|
22
22
|
return file_path
|
|
23
|
+
|
|
24
|
+
def remove_extension(filename: str) -> str:
|
|
25
|
+
if filename and '.' in filename:
|
|
26
|
+
return filename.rsplit('.', 1)[0]
|
|
27
|
+
return filename
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/document.py
RENAMED
|
@@ -4,7 +4,8 @@ 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
|
|
7
|
+
from documente_shared.application.files import remove_slash_from_path, get_filename_from_path, remove_extension
|
|
8
|
+
from documente_shared.application.numbers import normalize_number
|
|
8
9
|
from documente_shared.application.time_utils import get_datetime_from_data
|
|
9
10
|
from documente_shared.domain.constants import la_paz_tz
|
|
10
11
|
from documente_shared.domain.entities.document_metadata import DocumentProcessingMetadata
|
|
@@ -139,6 +140,10 @@ class DocumentProcessing(object):
|
|
|
139
140
|
def extended_filename(self) -> str:
|
|
140
141
|
return self.file_path.split('/')[-1]
|
|
141
142
|
|
|
143
|
+
@property
|
|
144
|
+
def raw_file_name(self) -> str:
|
|
145
|
+
return remove_extension(self.extended_filename)
|
|
146
|
+
|
|
142
147
|
@property
|
|
143
148
|
def filename(self) -> str:
|
|
144
149
|
filename_with_extension = self.extended_filename
|
|
@@ -248,11 +253,11 @@ class DocumentProcessing(object):
|
|
|
248
253
|
'processed_json_path': self.processed_json_path,
|
|
249
254
|
'processed_metadata_path': self.processed_metadata_path,
|
|
250
255
|
'processing_time': (
|
|
251
|
-
|
|
256
|
+
normalize_number(self.processing_time)
|
|
252
257
|
if self.processing_time else None
|
|
253
258
|
),
|
|
254
259
|
'processing_accuracy': (
|
|
255
|
-
|
|
260
|
+
normalize_number(self.processing_accuracy)
|
|
256
261
|
if self.processing_accuracy else None
|
|
257
262
|
),
|
|
258
263
|
'issued_at': self.issued_at.isoformat() if self.issued_at else None,
|
|
@@ -2,7 +2,7 @@ import base64
|
|
|
2
2
|
from typing import Optional
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
|
|
5
|
-
from documente_shared.application.files import get_filename_from_path
|
|
5
|
+
from documente_shared.application.files import get_filename_from_path, remove_extension
|
|
6
6
|
from documente_shared.domain.exceptions import InMemoryDocumentContentError
|
|
7
7
|
|
|
8
8
|
|
|
@@ -33,6 +33,10 @@ class InMemoryDocument(object):
|
|
|
33
33
|
def file_name(self) -> Optional[str]:
|
|
34
34
|
return get_filename_from_path(self.file_path) if self.file_path else None
|
|
35
35
|
|
|
36
|
+
@property
|
|
37
|
+
def raw_file_name(self) -> str:
|
|
38
|
+
return remove_extension(self.file_name)
|
|
39
|
+
|
|
36
40
|
@property
|
|
37
41
|
def file_key(self) -> Optional[str]:
|
|
38
42
|
return self.file_name
|
|
@@ -3,6 +3,7 @@ from datetime import datetime, tzinfo
|
|
|
3
3
|
from decimal import Decimal
|
|
4
4
|
from typing import Optional, List
|
|
5
5
|
|
|
6
|
+
from documente_shared.application.numbers import normalize_number
|
|
6
7
|
from documente_shared.application.time_utils import get_datetime_from_data
|
|
7
8
|
from documente_shared.domain.constants import la_paz_tz
|
|
8
9
|
from documente_shared.domain.entities.in_memory_document import InMemoryDocument
|
|
@@ -143,11 +144,11 @@ class ProcessingCaseItem(object):
|
|
|
143
144
|
if self.processed_json else None
|
|
144
145
|
),
|
|
145
146
|
'processing_time': (
|
|
146
|
-
|
|
147
|
+
normalize_number(self.processing_time)
|
|
147
148
|
if self.processing_time else None
|
|
148
149
|
),
|
|
149
150
|
'processing_confidence': (
|
|
150
|
-
|
|
151
|
+
normalize_number(self.processing_confidence)
|
|
151
152
|
if self.processing_confidence else None
|
|
152
153
|
),
|
|
153
154
|
'uploaded_at': (
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/digest.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/payloads.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/query_params.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/entities/scaling.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/common.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/interfaces/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/domain/interfaces/scaling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/lambdas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/presentation/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.104 → documente_shared-0.1.106}/documente_shared/presentation/presenters.py
RENAMED
|
File without changes
|