Skip to content

Conversation

@mukeshbhatt18gl
Copy link
Collaborator

@mukeshbhatt18gl mukeshbhatt18gl commented Nov 24, 2025

Description of change

This PR refactors the tap-formkeep codebase to use dynamic stream generation instead of static stream classes.
(SAC-29463)

Manual QA steps

  • Discovery: Running
  • Sync: Running
  • Unit Tests: Running
  • CI status: Not tested yet

Risks

Rollback steps

  • revert this branch

@mukeshbhatt18gl mukeshbhatt18gl changed the base branch from master to dynamic_schema_formkeep November 24, 2025 11:17
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the tap-formkeep codebase to use dynamic stream generation instead of static stream classes. The changes replace the hard-coded Submissions stream class with a runtime-generated approach that constructs streams from catalog metadata.

Key Changes:

  • Introduced dynamic stream creation via build_dynamic_stream() function that generates stream classes at runtime
  • Removed static Submissions stream class in favor of dynamic generation
  • Updated pagination logic to calculate total pages from API response instead of using next-page tokens

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
tap_formkeep/sync.py Added build_dynamic_stream() function and updated sync() to use dynamic streams
tap_formkeep/streams/submissions.py Removed entire static Submissions stream class
tap_formkeep/streams/abstracts.py Refactored pagination logic and parameter handling to support dynamic streams
tap_formkeep/streams/init.py Removed Submissions import and emptied STREAMS dictionary

@mukeshbhatt18gl mukeshbhatt18gl changed the title Sync chenges formkeep Sync changes formkeep Nov 24, 2025
self.metadata = metadata.to_map(catalog.metadata)
self.child_to_sync = []
self.params = {'api_token': 'api_token', 'page': 1, 'page_limit': 25, 'spam': 'False', 'startdate': ''}
self.params = {'page': 1, 'page_limit': self.page_size}

Choose a reason for hiding this comment

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

Let's make page_size configurable property.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

made the change for this

@RushiT0122 RushiT0122 requested a review from Copilot November 28, 2025 08:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.

url_endpoint = ""
path = ""
page_size = 25
page = 25
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

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

The variable name page is misleading as it represents the page size/limit, not a page number. It should be renamed to page_size or default_page_size to accurately reflect its purpose, especially since it's later assigned to self.page_size on line 46.

Copilot uses AI. Check for mistakes.
@mukeshbhatt18gl mukeshbhatt18gl merged commit 5557bdc into dynamic_schema_formkeep Nov 28, 2025
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.

3 participants