Skip to content

Commit

Permalink
feat: remove resource_type (#102)
Browse files Browse the repository at this point in the history
* feat: remove resource_type

* fix: add types-PyYAML as requirement to avoid EOFError in ubuntu
  • Loading branch information
jask90 authored Feb 19, 2024
1 parent 5f9078e commit c0aa0cb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 17 deletions.
6 changes: 0 additions & 6 deletions alice/onboarding/enums/duplicates_resource_type.py

This file was deleted.

5 changes: 0 additions & 5 deletions alice/onboarding/onboarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]]:
"""
Expand All @@ -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
Expand All @@ -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()

Expand Down
5 changes: 0 additions & 5 deletions alice/onboarding/onboarding_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1789,7 +1788,6 @@ def request_duplicates_search(
self,
start_date: datetime,
end_date: datetime,
resource_type: DuplicatesResourceType,
verbose: bool = False,
) -> Result[Response, Error]:
"""
Expand All @@ -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
Expand All @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
pip-audit
types-PyYAML==6.0.12.12

0 comments on commit c0aa0cb

Please sign in to comment.