-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TDL-22683] Use Date Windowing Pagination #113
Conversation
1) Removed endpoint params from activities generator. 2) Overrode modify_reques_params method for Loan Transactions generator. 3) Removed the method _all_fetch_batch_steps from multithreaded bookmark generator. 4) Modified the implementation for _all_fetch_batch_steps method in multithreaded offset generator to include date windowing. 5) Added new method modify_reques_params in multithreaded offset generator.
… Added 1 second in the BEFORE value.
bbeec12
to
c4232d6
Compare
c4232d6
to
5b691a9
Compare
- Minor refactoring
- Revert previous integration test changes
tap_mambu/helpers/client.py
Outdated
self.__username = username | ||
self.__password = password | ||
self.__subdomain = subdomain | ||
base_url = "https://{}.mambu.com/api".format(subdomain) | ||
self.base_url = base_url | ||
self.page_size = page_size | ||
self.window_size=window_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintain the spacing as on previous lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed already.
@@ -1,35 +0,0 @@ | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to remove these tests completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it because it was increasing execution time and not adding much value to the test suite.
tests/test_pagination.py
Outdated
@@ -16,6 +16,7 @@ def name(): | |||
|
|||
def untestable_streams(self): | |||
return set([ | |||
"clients", # Stream does not have enough records to test pagination |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there only a few records, or do we have no records at all? If we do have a small number of records, we can reduce the page limit and test this specific stream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window_size
implementation fixed the issue, removing clients
from untestable_streams()
.
self.__username = username | ||
self.__password = password | ||
self.__subdomain = subdomain | ||
base_url = "https://{}.mambu.com/api".format(subdomain) | ||
self.base_url = base_url | ||
self.page_size = page_size | ||
try: | ||
self.window_size = int(float(window_size)) if window_size else DEFAULT_DATE_WINDOW_SIZE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we do integer typecasting directly instead of, converting to float first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> int("10.0")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '10.0'
@@ -1,10 +1,11 @@ | |||
import time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the unused import time
Description of change
Manual QA steps
Risks
Rollback steps