Skip to content
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-20356 update function based to class based #51

Open
wants to merge 37 commits into
base: TDL-20357-add-missing-tap-tester-tests
Choose a base branch
from

Conversation

namrata270998
Copy link

@namrata270998 namrata270998 commented Aug 25, 2022

Description of change

  • Changed the function-based implementation to class-based implementation for all streams
  • Added new contacts stream with filters None, spam and blocked
  • Added bookmark for child classes
  • Added unittests for all the files
  • Added pylint

Manual QA steps

Risks

Rollback steps

  • revert this branch

@namrata270998 namrata270998 changed the base branch from crest-master to TDL-20357-add-missing-tap-tester-tests August 25, 2022 12:54
Copy link

@prijendev prijendev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tap-tester to check independent behaviour of parent-child streams and currently_sycning behaviour of streams (Reference) .

@prijendev prijendev self-requested a review August 31, 2022 12:24
BASE_URL = "https://{}.freshdesk.com"


def ratelimit(limit, every):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is already present under singer-python, so please import it and use it directly.
Reference: https://github.com/singer-io/singer-python/blob/master/singer/utils.py#L81-L99

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the defined function from the tap and used the pre-defined singer functions for rate limit

tap_freshdesk/sync.py Outdated Show resolved Hide resolved
tap_freshdesk/sync.py Outdated Show resolved Hide resolved
This function will get page size from config,
and will return the default value if an invalid page size is given.
"""
page_size = self.config.get('page_size')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
page_size = self.config.get('page_size')
page_size = self.config.get('page_size', DEFAULT_PAGE_SIZE)

We can remove the below condition -
if page_size is None: return DEFAULT_PAGE_SIZE

expected_list_3 = [{"name": "Agency", "value": "justice league"},
{"name": "Department", "value": "superhero"}]

@ parameterized.expand([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@ parameterized.expand([
@parameterized.expand([

Typo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants