documente_shared 0.1.71__tar.gz → 0.1.72__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.71 → documente_shared-0.1.72}/PKG-INFO +1 -1
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/processing_case.py +9 -4
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/processing_case_item.py +10 -4
- {documente_shared-0.1.71 → documente_shared-0.1.72}/pyproject.toml +1 -1
- {documente_shared-0.1.71 → documente_shared-0.1.72}/README.md +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/files.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/document.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/in_memory_result.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/processing_event.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/common.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/repositories/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/repositories/document.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/repositories/processing_case.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/repositories/processing_case_item.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/repositories/__init__.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/repositories/dynamo_document.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/repositories/dynamo_processing_case.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/sqs_queue.py +0 -0
|
@@ -11,7 +11,8 @@ from documente_shared.domain.enums.processing_case import ProcessingCaseCategory
|
|
|
11
11
|
|
|
12
12
|
@dataclass
|
|
13
13
|
class ProcessingCase(object):
|
|
14
|
-
|
|
14
|
+
uuid: str
|
|
15
|
+
label: str
|
|
15
16
|
status: ProcessingStatus
|
|
16
17
|
category: Optional[ProcessingCaseCategory] = None
|
|
17
18
|
enqueued_at: Optional[datetime] = None
|
|
@@ -61,7 +62,8 @@ class ProcessingCase(object):
|
|
|
61
62
|
return False
|
|
62
63
|
|
|
63
64
|
return (
|
|
64
|
-
self.
|
|
65
|
+
self.uuid == other.uuid
|
|
66
|
+
and self.label == other.label
|
|
65
67
|
and self.status == other.status
|
|
66
68
|
and self.category == other.category
|
|
67
69
|
and self.enqueued_at == other.enqueued_at
|
|
@@ -75,7 +77,8 @@ class ProcessingCase(object):
|
|
|
75
77
|
@property
|
|
76
78
|
def to_dict(self) -> dict:
|
|
77
79
|
return {
|
|
78
|
-
'
|
|
80
|
+
'uuid': self.uuid,
|
|
81
|
+
'label': self.label,
|
|
79
82
|
'status': str(self.status),
|
|
80
83
|
'category': (
|
|
81
84
|
str(self.category)
|
|
@@ -100,6 +103,7 @@ class ProcessingCase(object):
|
|
|
100
103
|
properties: List[str] = None,
|
|
101
104
|
):
|
|
102
105
|
instance_properties = properties or [
|
|
106
|
+
'label',
|
|
103
107
|
'status',
|
|
104
108
|
'category',
|
|
105
109
|
'enqueued_at',
|
|
@@ -120,7 +124,8 @@ class ProcessingCase(object):
|
|
|
120
124
|
@classmethod
|
|
121
125
|
def from_dict(cls, data: dict) -> 'ProcessingCase':
|
|
122
126
|
return cls(
|
|
123
|
-
|
|
127
|
+
uuid=data.get('uuid'),
|
|
128
|
+
label=data.get('label'),
|
|
124
129
|
status=ProcessingStatus.from_value(data.get('status')),
|
|
125
130
|
category=(
|
|
126
131
|
ProcessingCaseCategory.from_value(data.get('category'))
|
|
@@ -12,7 +12,7 @@ from documente_shared.domain.enums.processing_case import ProcessingDocumentType
|
|
|
12
12
|
|
|
13
13
|
@dataclass
|
|
14
14
|
class ProcessingCaseItem(object):
|
|
15
|
-
|
|
15
|
+
uuid: str
|
|
16
16
|
case_id: str
|
|
17
17
|
digest: str
|
|
18
18
|
status: ProcessingStatus
|
|
@@ -24,6 +24,7 @@ class ProcessingCaseItem(object):
|
|
|
24
24
|
processed_json: Optional[InMemoryDocument] = None
|
|
25
25
|
processing_time: Optional[Decimal] = None
|
|
26
26
|
processing_confidence: Optional[Decimal] = None
|
|
27
|
+
uploaded_at: Optional[datetime] = None
|
|
27
28
|
started_at: Optional[datetime] = None
|
|
28
29
|
failed_at: Optional[datetime] = None
|
|
29
30
|
completed_at: Optional[datetime] = None
|
|
@@ -85,12 +86,14 @@ class ProcessingCaseItem(object):
|
|
|
85
86
|
return False
|
|
86
87
|
|
|
87
88
|
return (
|
|
88
|
-
self.
|
|
89
|
+
self.uuid == other.uuid
|
|
90
|
+
and self.digest == other.digest
|
|
89
91
|
and self.status == other.status
|
|
90
92
|
and self.document_type == other.document_type
|
|
91
93
|
and self.document == other.document
|
|
92
94
|
and self.processing_time == other.processing_time
|
|
93
95
|
and self.processing_confidence == other.processing_confidence
|
|
96
|
+
and self.uploaded_at == other.uploaded_at
|
|
94
97
|
and self.started_at == other.started_at
|
|
95
98
|
and self.failed_at == other.failed_at
|
|
96
99
|
and self.completed_at == other.completed_at
|
|
@@ -99,7 +102,7 @@ class ProcessingCaseItem(object):
|
|
|
99
102
|
@property
|
|
100
103
|
def to_dict(self) -> dict:
|
|
101
104
|
return {
|
|
102
|
-
'
|
|
105
|
+
'uuid': self.uuid,
|
|
103
106
|
'case_id': self.case_id,
|
|
104
107
|
'digest': self.digest,
|
|
105
108
|
'status': str(self.status),
|
|
@@ -129,6 +132,7 @@ class ProcessingCaseItem(object):
|
|
|
129
132
|
str(self.processing_confidence.quantize(Decimal('0.001')))
|
|
130
133
|
if self.processing_confidence else None
|
|
131
134
|
),
|
|
135
|
+
'uploaded_at': self.uploaded_at.isoformat() if self.uploaded_at else None,
|
|
132
136
|
'started_at': self.started_at.isoformat() if self.started_at else None,
|
|
133
137
|
'failed_at': self.failed_at.isoformat() if self.failed_at else None,
|
|
134
138
|
'feedback': self.feedback,
|
|
@@ -156,6 +160,7 @@ class ProcessingCaseItem(object):
|
|
|
156
160
|
'processed_json',
|
|
157
161
|
'processing_time',
|
|
158
162
|
'processing_confidence',
|
|
163
|
+
'uploaded_at',
|
|
159
164
|
'started_at',
|
|
160
165
|
'failed_at',
|
|
161
166
|
'completed_at',
|
|
@@ -172,7 +177,7 @@ class ProcessingCaseItem(object):
|
|
|
172
177
|
@classmethod
|
|
173
178
|
def from_dict(cls, data: dict) -> 'ProcessingCaseItem':
|
|
174
179
|
return cls(
|
|
175
|
-
|
|
180
|
+
uuid=data.get('uuid'),
|
|
176
181
|
case_id=data.get('case_id'),
|
|
177
182
|
digest=data.get('digest'),
|
|
178
183
|
status=ProcessingStatus.from_value(data.get('status')),
|
|
@@ -202,6 +207,7 @@ class ProcessingCaseItem(object):
|
|
|
202
207
|
Decimal(data.get('processing_confidence'))
|
|
203
208
|
if data.get('processing_confidence') else None
|
|
204
209
|
),
|
|
210
|
+
uploaded_at=get_datetime_from_data(input_datetime=data.get('uploaded_at')),
|
|
205
211
|
started_at=get_datetime_from_data(input_datetime=data.get('started_at')),
|
|
206
212
|
failed_at=get_datetime_from_data(input_datetime=data.get('failed_at')),
|
|
207
213
|
feedback=data.get('feedback'),
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/entities/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/enums/processing_case.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/repositories/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/domain/repositories/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/dynamo_table.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
{documente_shared-0.1.71 → documente_shared-0.1.72}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|