documente_shared 0.1.62__tar.gz → 0.1.63__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.62 → documente_shared-0.1.63}/PKG-INFO +1 -1
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/entities/document.py +49 -29
- {documente_shared-0.1.62 → documente_shared-0.1.63}/pyproject.toml +1 -1
- {documente_shared-0.1.62 → documente_shared-0.1.63}/README.md +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/enums.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/repositories.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/dynamo_repositories.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/sqs_queue.py +0 -0
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/entities/document.py
RENAMED
|
@@ -94,6 +94,55 @@ class DocumentProcessing(object):
|
|
|
94
94
|
DocumentProcessingStatus.FAILED,
|
|
95
95
|
]
|
|
96
96
|
|
|
97
|
+
@property
|
|
98
|
+
def file_key(self) -> str:
|
|
99
|
+
return remove_slash_from_path(self.file_path)
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def processed_csv_key(self) -> str:
|
|
103
|
+
return remove_slash_from_path(self.processed_csv_path)
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def processed_xlsx_key(self) -> str:
|
|
107
|
+
return remove_slash_from_path(self.processed_xlsx_path)
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def processed_json_key(self) -> str:
|
|
111
|
+
return remove_slash_from_path(self.processed_json_path)
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def processed_metadata_key(self) -> str:
|
|
115
|
+
return remove_slash_from_path(self.processed_metadata_path)
|
|
116
|
+
|
|
117
|
+
@property
|
|
118
|
+
def extended_filename(self) -> str:
|
|
119
|
+
return self.file_path.split('/')[-1]
|
|
120
|
+
|
|
121
|
+
@property
|
|
122
|
+
def filename(self) -> str:
|
|
123
|
+
filename_with_extension = self.extended_filename
|
|
124
|
+
return filename_with_extension.split('.')[0]
|
|
125
|
+
|
|
126
|
+
@property
|
|
127
|
+
def has_original_file(self) -> bool:
|
|
128
|
+
return bool(self.file_path) and self.file_bytes
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def has_processed_csv(self) -> bool:
|
|
132
|
+
return bool(self.processed_csv_path) and self.processed_csv_bytes
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def has_processed_xlsx(self) -> bool:
|
|
136
|
+
return bool(self.processed_xlsx_path) and self.processed_xlsx_bytes
|
|
137
|
+
|
|
138
|
+
@property
|
|
139
|
+
def has_processed_json(self) -> bool:
|
|
140
|
+
return bool(self.processed_json_path) and self.processed_json_bytes
|
|
141
|
+
|
|
142
|
+
@property
|
|
143
|
+
def has_processed_metadata(self) -> bool:
|
|
144
|
+
return bool(self.processed_metadata_path) and self.metadata_items
|
|
145
|
+
|
|
97
146
|
def pending(self, timezone: tzinfo = la_paz_tz):
|
|
98
147
|
self.status = DocumentProcessingStatus.PENDING
|
|
99
148
|
self.started_at = None
|
|
@@ -130,35 +179,6 @@ class DocumentProcessing(object):
|
|
|
130
179
|
|
|
131
180
|
def in_review(self):
|
|
132
181
|
self.status = DocumentProcessingStatus.IN_REVIEW
|
|
133
|
-
|
|
134
|
-
@property
|
|
135
|
-
def file_key(self) -> str:
|
|
136
|
-
return remove_slash_from_path(self.file_path)
|
|
137
|
-
|
|
138
|
-
@property
|
|
139
|
-
def processed_csv_key(self) -> str:
|
|
140
|
-
return remove_slash_from_path(self.processed_csv_path)
|
|
141
|
-
|
|
142
|
-
@property
|
|
143
|
-
def processed_xlsx_key(self) -> str:
|
|
144
|
-
return remove_slash_from_path(self.processed_xlsx_path)
|
|
145
|
-
|
|
146
|
-
@property
|
|
147
|
-
def processed_json_key(self) -> str:
|
|
148
|
-
return remove_slash_from_path(self.processed_json_path)
|
|
149
|
-
|
|
150
|
-
@property
|
|
151
|
-
def processed_metadata_key(self) -> str:
|
|
152
|
-
return remove_slash_from_path(self.processed_metadata_path)
|
|
153
|
-
|
|
154
|
-
@property
|
|
155
|
-
def extended_filename(self) -> str:
|
|
156
|
-
return self.file_path.split('/')[-1]
|
|
157
|
-
|
|
158
|
-
@property
|
|
159
|
-
def filename(self) -> str:
|
|
160
|
-
filename_with_extension = self.extended_filename
|
|
161
|
-
return filename_with_extension.split('.')[0]
|
|
162
182
|
|
|
163
183
|
def __eq__(self, other: 'DocumentProcessing') -> bool:
|
|
164
184
|
if not other:
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/dynamo_table.py
RENAMED
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
{documente_shared-0.1.62 → documente_shared-0.1.63}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|