-
Notifications
You must be signed in to change notification settings - Fork 33
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-14989: Check best practices #66
base: master
Are you sure you want to change the base?
Conversation
tests/test_exacttarget_all_fields.py
Outdated
with self.subTest(stream=stream): | ||
|
||
# # expected values | ||
# expected_automatic_keys = self.expected_automatic_fields().get(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.
Why we commented this line? Can we remove the line if not required?
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.
Done
tests/test_exacttarget_all_fields.py
Outdated
expected_all_keys.remove('SendClassification') # not retrievable | ||
expected_all_keys.remove('PartnerProperties') # not retrievable | ||
elif stream == 'subscriber': | ||
expected_all_keys.remove('CustomerKey') # not retrievable |
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.
Create a list and run a loop for this.
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.
Done
tests/test_exacttarget_bookmarks.py
Outdated
### Update Start Date | ||
########################################################################## | ||
|
||
self.START_DATE = '2021-01-01T00:00:00Z' |
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.
For the Bookmark test why we are updating start_date? We need to update the state.
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.
Updated the code change to use state.
tests/base.py
Outdated
return { | ||
"campaign": { | ||
"primary-key": {"id"}, | ||
"replication": "FULL" |
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.
Instead of using primary-key
, replication
, replication-key
, FULL
, INCREMENTAL
, create constants of those and use those. use FULL_TABLE instead of FULL
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.
Updated the code.
.circleci/config.yml
Outdated
@@ -21,21 +21,15 @@ jobs: | |||
name: 'pylint' | |||
command: | | |||
source /usr/local/share/virtualenvs/tap-exacttarget/bin/activate | |||
pylint tap_exacttarget -d no-else-return,wrong-import-order,pointless-string-statement,invalid-name,deprecated-method,bad-whitespace,line-too-long | |||
pylint tap_exacttarget -d no-else-return,wrong-import-order,pointless-string-statement,invalid-name,deprecated-method,bad-whitespace,line-too-long,consider-using-sys-exit |
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.
Why do we need to update the pylint?
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.
Added a NOTE about that in the PR description.
setup.py
Outdated
'python-dateutil==2.6.0', | ||
'voluptuous==0.10.5', | ||
'Salesforce-FuelSDK==1.3.0' | ||
], | ||
extras_require={ | ||
'dev': [ | ||
'ipdb==0.11', | ||
'pylint==2.1.1', | ||
'astroid==2.1.0', | ||
'pylint==2.4.4', |
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 special requirement to upgrade pylint and astroid?
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.
@harshpatel4crest Please update both the modules to their latest versions currently available on pypi
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.
Done
@@ -1,101 +0,0 @@ | |||
import datetime |
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.
Instead of removing the discovery test, could you update it to meet current standards https://github.com/stitchdata/tap-tester/blob/master/reference/expectations/saas_taps.md#test_discoverypy
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 is added as part of PR #68.
setup.py
Outdated
'dev': [ | ||
'ipdb==0.11', | ||
'pylint==2.1.1', | ||
'astroid==2.1.0', | ||
'pylint==2.10.2', | ||
'astroid==2.7.3', |
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 you actually separate these into a two groups: dev
and test
. The test
group should have astroid and nose and we should install that group as part of the circleci build.
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.
Updated the code.
if stream == "subscriber": | ||
continue | ||
|
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 you elaborate on why this stream cannot be tested. If we cannot get a replication key value from the api, we should consider making this stream Full Table.
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.
I am still not clear on why this stream cannot be tested 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.
Subscriber
(child stream) will not have any bookmark as it only syncs the provided list of subscribers keys and the subscribers key will be created from the list_subscribers
(parent stream) based on the records returned from the API.
As discussed here
…nResetErrors (#71) * added backoff for certain errors * resolve pylint * updated decorator location * added unittests * added comment * added comments
* updated error message when generating auth_stub * made changes according to the comments * updated the code acording to the comments * updated the tap tester image * updated pylint and astroid to latest version * updated the code as, on updating tap tester image it was throwing cascading errors * updated config.yml file * updated the start date for integration tests as per the params * removed scenario as new tap-tester version does not support it * updated start date in the base file test
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 this PR be closed, it is mentioned in a different already merged PR.
@KrisPersonal will you close these kinds of PRs? As we are merging one master(crest-master) branch only. |
Description of change
TDL-14989: Check best practices
Updated the tap-tester image tap-tester-v4 -> stitch-tap-tester
Updated the sandbox -> tap_tester_sandbox
Updated singer-python 5.9.0 -> 5.12.1
Added Integration tests for:
NOTE:
exit
withsys.exit
because pylint was failing.super
used in the code withPython 3 style super() without arguments
as pylint was filing by using super with arguments.Manual QA steps
Risks
Rollback steps