-
Notifications
You must be signed in to change notification settings - Fork 20
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
Enable dev mode #76
Enable dev mode #76
Conversation
FYI... I will raise separate PR for integration tests to implement token chain. |
@@ -1,6 +1,6 @@ | |||
#!/usr/bin/env python3 | |||
import singer | |||
from singer import utils | |||
from singer import utils as _utils |
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.
does this import create a conflict with the tap utils.py?
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.
Yes, it does because of which I have used an alias here.
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.
It was causing issue with below import statement in client.py#L8
from tap_typeform.utils import write_config
@@ -138,7 +189,7 @@ def get_page_size(self, config): | |||
if page_size is None: | |||
return | |||
if ((type(page_size) == int or type(page_size) == float) and (page_size > 0)) or \ | |||
(type(page_size) == str and page_size.replace('.', '', 1).isdigit() and (float(page_size) > 0) ): | |||
(type(page_size) == str and page_size.replace('.', '', 1).isdigit() and (float(page_size) > 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.
we can simplify this by a small block instead of using a function to parse page_size in the init
eg:
try:
page_size = int(config.get('page_size') or 0)
if page_size > 0:
self.page_size = page_size
self.form_page_size = min(self.form_page_size, self.page_size)
else:
raise ValueError("Negative or invalid ....")
except (ValueError, TypeError) as err:
LOGGER.info("Invalid Value: %s, for page_size", config.get('email_activity_date_window', 0))
raise from err
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.
This is unintentional refactoring change without any logical change. I would not prefer to cause any regression because of new changes.
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.
okay
import backoff | ||
import singer | ||
|
||
from datetime import timedelta | ||
from singer.utils import now | ||
from requests.exceptions import ChunkedEncodingError, Timeout, ConnectionError | ||
from tap_typeform.utils import write_config | ||
|
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.
from datetime import timedelta
import backoff
from requests.exceptions import ChunkedEncodingError, Timeout, ConnectionError
import singer
from singer.utils import now
from tap_typeform.utils import write_config
i suggest keeping standard imports first
* add token chaining in integration tests --------- Co-authored-by: RushiT0122 <[email protected]>
Description of change
Related PRs
Manual QA steps
Risks
Rollback steps