Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a comprehensive Python unittest suite around tap_harvest_forecast behavior (discovery, sync/windowing, bookmarks/state) and updates dependencies/CI to run the tests while also adjusting several JSON schemas to allow nullable arrays/objects.
Changes:
- Add new unit + “integration-style” tests covering discovery output, pagination/windowing, bookmarking, interrupted sync resumption, and start_date filtering.
- Update multiple stream schemas to allow
nullfor fields that are sometimes returned as null (arrays/objects). - Bump library pins and update CircleCI to run
unittestand use Python 3.12.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/unittests/test_init.py |
New unit tests for core helpers (auth, request, windowing, discover, sync, main). |
tests/unittests/__init__.py |
Marks tests/unittests as a package for discovery/imports. |
tests/base.py |
Shared test utilities + mock config/records/catalog creation for integration-style tests. |
tests/test_discovery.py |
Verifies discover-mode JSON catalog structure and metadata. |
tests/test_pagination.py |
Verifies windowed sync requests and cross-window behavior. |
tests/test_start_date.py |
Verifies start_date filtering and initial bookmark behavior. |
tests/test_bookmark.py |
Verifies bookmark advancement and filtering with existing state. |
tests/test_interrupted_sync.py |
Verifies resuming from last bookmark and state update cadence. |
tests/test_automatic_fields.py |
Verifies PK/replication key fields are always present. |
tests/test_all_fields.py |
Verifies output includes all record fields provided by mock records. |
tests/__init__.py |
Marks tests as a package for relative imports. |
tap_harvest_forecast/schemas/roles.json |
Allow person_ids/placeholder_ids to be null or array. |
tap_harvest_forecast/schemas/projects.json |
Allow tags to be null or array. |
tap_harvest_forecast/schemas/placeholders.json |
Allow roles to be null or array. |
tap_harvest_forecast/schemas/people.json |
Allow roles to be null or array; working_days to be null or object. |
setup.py |
Update pinned dependency versions. |
.circleci/config.yml |
Switch venv to Python 3.12 and add a step to run the test suite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of change
Adds a comprehensive Python unittest suite around
tap_harvest_forecastbehavior (discovery, sync/windowing, bookmarks/state) and updates dependencies/CI to run the tests while also adjusting several JSON schemas to allow nullable arrays/objects.Jira Ticket: SAC-28723
Changes:
nullfor fields that are sometimes returned as null (arrays/objects).unittestand use Python 3.12.Manual QA steps
Risks
Rollback steps
AI generated code
https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code