From cddc6815dcfb7a6f2bd1e09d2bc9b8e854fb39db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fraga=20Bouz=C3=B3n?= Date: Mon, 19 Feb 2024 11:54:49 +0100 Subject: [PATCH 1/2] feat: remove resource_type --- alice/onboarding/enums/duplicates_resource_type.py | 6 ------ alice/onboarding/onboarding.py | 5 ----- alice/onboarding/onboarding_client.py | 5 ----- 3 files changed, 16 deletions(-) delete mode 100644 alice/onboarding/enums/duplicates_resource_type.py diff --git a/alice/onboarding/enums/duplicates_resource_type.py b/alice/onboarding/enums/duplicates_resource_type.py deleted file mode 100644 index 6a7369d..0000000 --- a/alice/onboarding/enums/duplicates_resource_type.py +++ /dev/null @@ -1,6 +0,0 @@ -from enum import Enum - - -class DuplicatesResourceType(str, Enum): - DOCUMENT = "document" - SELFIE = "selfie" diff --git a/alice/onboarding/onboarding.py b/alice/onboarding/onboarding.py index 194b8bd..e962e44 100644 --- a/alice/onboarding/onboarding.py +++ b/alice/onboarding/onboarding.py @@ -12,7 +12,6 @@ from alice.onboarding.enums.document_side import DocumentSide from alice.onboarding.enums.document_source import DocumentSource from alice.onboarding.enums.document_type import DocumentType -from alice.onboarding.enums.duplicates_resource_type import DuplicatesResourceType from alice.onboarding.enums.onboarding_steps import OnboardingStep from alice.onboarding.enums.user_state import UserState from alice.onboarding.enums.version import Version @@ -1563,7 +1562,6 @@ def request_duplicates_search( self, start_date: datetime, end_date: datetime, - resource_type: DuplicatesResourceType, verbose: bool = False, ) -> Result[str, Union[OnboardingError, AuthError]]: """ @@ -1576,8 +1574,6 @@ def request_duplicates_search( Beginning datetime of the temporal window end_date Ending datetime of the temporal window - resource_type - Entity to analyze (selfie or document) verbose Used for print service response as well as the time elapsed @@ -1591,7 +1587,6 @@ def request_duplicates_search( response = self.onboarding_client.request_duplicates_search( start_date=start_date, end_date=end_date, - resource_type=resource_type, verbose=verbose, ).unwrap_or_return() diff --git a/alice/onboarding/onboarding_client.py b/alice/onboarding/onboarding_client.py index 14b913f..f035ee2 100644 --- a/alice/onboarding/onboarding_client.py +++ b/alice/onboarding/onboarding_client.py @@ -14,7 +14,6 @@ from alice.onboarding.enums.document_side import DocumentSide from alice.onboarding.enums.document_source import DocumentSource from alice.onboarding.enums.document_type import DocumentType -from alice.onboarding.enums.duplicates_resource_type import DuplicatesResourceType from alice.onboarding.enums.onboarding_steps import OnboardingStep from alice.onboarding.enums.user_state import UserState from alice.onboarding.enums.version import Version @@ -1789,7 +1788,6 @@ def request_duplicates_search( self, start_date: datetime, end_date: datetime, - resource_type: DuplicatesResourceType, verbose: bool = False, ) -> Result[Response, Error]: """ @@ -1802,8 +1800,6 @@ def request_duplicates_search( Beginning datetime of the temporal window end_date Ending datetime of the temporal window - resource_type - Entity to analyze (selfie or document) verbose Used for print service response as well as the time elapsed @@ -1822,7 +1818,6 @@ def request_duplicates_search( data = { "start_date": start_date.isoformat(), "end_date": end_date.isoformat(), - "resource_type": resource_type.value, } try: response = self.session.post( From ee188e6b2973980c5945697501b0ac2bef23f174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fraga=20Bouz=C3=B3n?= Date: Mon, 19 Feb 2024 12:23:02 +0100 Subject: [PATCH 2/2] fix: add types-PyYAML as requirement to avoid EOFError in ubuntu --- requirements/dev-requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index 82e3d24..77f2e12 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -12,4 +12,5 @@ pytest-clarity==1.0.1 requests-mock==1.8.0 pyupgrade==3.2.0 types-requests==2.28.11.5 -pip-audit \ No newline at end of file +pip-audit +types-PyYAML==6.0.12.12 \ No newline at end of file