documente_shared 0.1.95__tar.gz → 0.1.97__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.95 → documente_shared-0.1.97}/PKG-INFO +1 -1
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/processing_case_item.py +12 -0
- documente_shared-0.1.97/documente_shared/infrastructure/repositories/mem_document.py +37 -0
- documente_shared-0.1.97/documente_shared/infrastructure/repositories/mem_processing_case.py +36 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/pyproject.toml +1 -1
- {documente_shared-0.1.95 → documente_shared-0.1.97}/README.md +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/dates.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/digest.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/exceptions.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/files.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/payloads.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/query_params.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/time_utils.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/timezone.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/base_enum.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/constants.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/document.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/document_metadata.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/in_memory_result.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/processing_case.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/processing_case_filters.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/processing_case_item_filters.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/processing_event.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/scaling.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/common.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/document.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/processing_case.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/interfaces/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/interfaces/scaling.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/repositories/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/repositories/document.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/repositories/processing_case.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/repositories/processing_case_item.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/documente_client.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/dynamo_table.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/lambdas.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/dynamo_document.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/dynamo_processing_case.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/dynamo_processing_case_item.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/http_document_processing.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/http_processing_case.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/repositories/http_processing_case_item.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/s3_bucket.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/services/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/services/http_scaling.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/sqs_queue.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/presentation/__init__.py +0 -0
- {documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/presentation/presenters.py +0 -0
|
@@ -34,6 +34,18 @@ class ProcessingCaseItem(object):
|
|
|
34
34
|
def __post_init__(self):
|
|
35
35
|
self.feedback = self.feedback or []
|
|
36
36
|
self.metadata = self.metadata or {}
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def has_processed_csv(self) -> bool:
|
|
40
|
+
return self.processed_csv and self.processed_csv.is_valid
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def has_processed_xlsx(self) -> bool:
|
|
44
|
+
return self.processed_xlsx and self.processed_xlsx.is_valid
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def has_processed_json(self) -> bool:
|
|
48
|
+
return self.processed_json and self.processed_json.is_valid
|
|
37
49
|
|
|
38
50
|
@property
|
|
39
51
|
def is_procesable(self) -> bool:
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from documente_shared.domain.entities.document import DocumentProcessing
|
|
5
|
+
from documente_shared.domain.enums.document import DocumentProcessingStatus
|
|
6
|
+
from documente_shared.domain.repositories.document import DocumentProcessingRepository
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class MemoryDocumentProcessingRepository(DocumentProcessingRepository):
|
|
11
|
+
collection: dict[str, DocumentProcessing] = None
|
|
12
|
+
|
|
13
|
+
def __post_init__(self):
|
|
14
|
+
self.collection = self.collection or {}
|
|
15
|
+
|
|
16
|
+
def find(self, digest: str) -> Optional[DocumentProcessing]:
|
|
17
|
+
if digest in self.collection:
|
|
18
|
+
return self.collection[digest]
|
|
19
|
+
return None
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def persist(self, instance: DocumentProcessing) -> DocumentProcessing:
|
|
23
|
+
self.collection[instance.digest] = instance
|
|
24
|
+
return instance
|
|
25
|
+
|
|
26
|
+
def remove(self, instance: DocumentProcessing):
|
|
27
|
+
if instance.digest in self.collection:
|
|
28
|
+
del self.collection[instance.digest]
|
|
29
|
+
return None
|
|
30
|
+
|
|
31
|
+
def filter(self, statuses: List[DocumentProcessingStatus]) -> List[DocumentProcessing]:
|
|
32
|
+
items = []
|
|
33
|
+
for status in statuses:
|
|
34
|
+
items.extend(
|
|
35
|
+
[item for item in self.collection.values() if item.status == status]
|
|
36
|
+
)
|
|
37
|
+
return items
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from dataclasses import dataclass
|
|
2
|
+
from typing import List, Optional
|
|
3
|
+
|
|
4
|
+
from documente_shared.domain.entities.processing_case import ProcessingCase
|
|
5
|
+
from documente_shared.domain.entities.processing_case_filters import ProcessingCaseFilters
|
|
6
|
+
|
|
7
|
+
from documente_shared.domain.repositories.processing_case import ProcessingCaseRepository
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass
|
|
11
|
+
class MemoryProcessingCaseRepository(ProcessingCaseRepository):
|
|
12
|
+
collection: dict[str, ProcessingCase] = None
|
|
13
|
+
|
|
14
|
+
def __post_init__(self):
|
|
15
|
+
self.collection = self.collection or {}
|
|
16
|
+
|
|
17
|
+
def find(
|
|
18
|
+
self,
|
|
19
|
+
uuid: str,
|
|
20
|
+
include_items: bool = False,
|
|
21
|
+
) -> Optional[ProcessingCase]:
|
|
22
|
+
if uuid in self.collection:
|
|
23
|
+
return self.collection[uuid]
|
|
24
|
+
return None
|
|
25
|
+
|
|
26
|
+
def persist(self, instance: ProcessingCase) -> ProcessingCase:
|
|
27
|
+
self.collection[instance.uuid] = instance
|
|
28
|
+
return instance
|
|
29
|
+
|
|
30
|
+
def remove(self, instance: ProcessingCase):
|
|
31
|
+
if instance.uuid in self.collection:
|
|
32
|
+
del self.collection[instance.uuid]
|
|
33
|
+
return None
|
|
34
|
+
|
|
35
|
+
def filter(self, filters: ProcessingCaseFilters) -> List[ProcessingCase]:
|
|
36
|
+
return []
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/payloads.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/query_params.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/time_utils.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/application/timezone.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/entities/document.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.95 → documente_shared-0.1.97}/documente_shared/domain/entities/scaling.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/document.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/enums/processing_case.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/interfaces/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/interfaces/scaling.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/repositories/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/domain/repositories/document.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/dynamo_table.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/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
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/s3_bucket.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/infrastructure/sqs_queue.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/presentation/__init__.py
RENAMED
|
File without changes
|
{documente_shared-0.1.95 → documente_shared-0.1.97}/documente_shared/presentation/presenters.py
RENAMED
|
File without changes
|