documente_shared 0.1.105__py3-none-any.whl → 0.1.106__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/files.py +5 -0
- documente_shared/domain/entities/document.py +5 -1
- documente_shared/domain/entities/in_memory_document.py +5 -1
- {documente_shared-0.1.105.dist-info → documente_shared-0.1.106.dist-info}/METADATA +1 -1
- {documente_shared-0.1.105.dist-info → documente_shared-0.1.106.dist-info}/RECORD +6 -6
- {documente_shared-0.1.105.dist-info → documente_shared-0.1.106.dist-info}/WHEEL +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
|
|
@@ -4,7 +4,7 @@ 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
8
|
from documente_shared.application.numbers import normalize_number
|
|
9
9
|
from documente_shared.application.time_utils import get_datetime_from_data
|
|
10
10
|
from documente_shared.domain.constants import la_paz_tz
|
|
@@ -140,6 +140,10 @@ class DocumentProcessing(object):
|
|
|
140
140
|
def extended_filename(self) -> str:
|
|
141
141
|
return self.file_path.split('/')[-1]
|
|
142
142
|
|
|
143
|
+
@property
|
|
144
|
+
def raw_file_name(self) -> str:
|
|
145
|
+
return remove_extension(self.extended_filename)
|
|
146
|
+
|
|
143
147
|
@property
|
|
144
148
|
def filename(self) -> str:
|
|
145
149
|
filename_with_extension = self.extended_filename
|
|
@@ -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,7 +3,7 @@ documente_shared/application/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
3
3
|
documente_shared/application/dates.py,sha256=uExNddWmX9VEX_u420JGoC7fL-ieJ4956I0aw_WX3sQ,109
|
|
4
4
|
documente_shared/application/digest.py,sha256=Um6E8WfFri2_lly4RFWydJyvSfPZGFcOX-opEOzDCWc,172
|
|
5
5
|
documente_shared/application/exceptions.py,sha256=lQM8m7wmI9OTLGva0gd7s7YT7ldaTk_Ln4t32PpzNf8,654
|
|
6
|
-
documente_shared/application/files.py,sha256=
|
|
6
|
+
documente_shared/application/files.py,sha256=_qkpeFPVmHyNhD6_PFZdzhyYvshJVeeSiwuTggK-A9Q,793
|
|
7
7
|
documente_shared/application/json.py,sha256=5y67-DoiJlq_fLefgJ8YBVsdyua4KykxbSUKQqcwnnQ,1223
|
|
8
8
|
documente_shared/application/numbers.py,sha256=rik1SqMxLzXNL2S5Yh1Q8CSONdcjjoCBnByFasxR4_Q,212
|
|
9
9
|
documente_shared/application/payloads.py,sha256=s6SjaNN18_aQ6IL083Zq2J8thRCZ_zC2sn7hkfjK_Go,453
|
|
@@ -14,9 +14,9 @@ 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=9X6XCE-zTm0q8ASBn-5TAvNwK4iO_70KHkcgyMSO9JI,13044
|
|
18
18
|
documente_shared/domain/entities/document_metadata.py,sha256=ygyFIC5qwxlm8DUM5kvVFny9zJfPQS8vNLM2br5XsQ8,2353
|
|
19
|
-
documente_shared/domain/entities/in_memory_document.py,sha256=
|
|
19
|
+
documente_shared/domain/entities/in_memory_document.py,sha256=BswTG1LjrQ8nP3pb0T2bSODPjJ2ud4ifbnYxRdFlIhY,2116
|
|
20
20
|
documente_shared/domain/entities/processing_case.py,sha256=NwGGGMyXnNprtO1lCP6rkPbhGhZ6C_z30OeHi_LHXDY,5706
|
|
21
21
|
documente_shared/domain/entities/processing_case_filters.py,sha256=harKyu7QEuL1bI_Z8_UxkVCMo5r9vHeNHyi_Ja07vjs,1953
|
|
22
22
|
documente_shared/domain/entities/processing_case_item.py,sha256=xmeN99qiGfVptIAs6t2DOksAJhkfnhzOaP9p5yiPR1s,10146
|
|
@@ -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.106.dist-info/METADATA,sha256=vsNpb4RO1NoOOjJT1ZGOGaNTkqc-Mfi6NqZs1jUX8ds,963
|
|
59
|
+
documente_shared-0.1.106.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
60
|
+
documente_shared-0.1.106.dist-info/RECORD,,
|
|
File without changes
|