Skip to content

Update libraries and add tests#32

Open
MuralidharT03 wants to merge 4 commits intomasterfrom
python-version-upgrade
Open

Update libraries and add tests#32
MuralidharT03 wants to merge 4 commits intomasterfrom
python-version-upgrade

Conversation

@MuralidharT03
Copy link
Copy Markdown

@MuralidharT03 MuralidharT03 commented Mar 26, 2026

Description of change

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.

Jira Ticket: SAC-28723

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 null for fields that are sometimes returned as null (arrays/objects).
  • Bump library pins and update CircleCI to run unittest and use Python 3.12.

Manual QA steps

Risks

Rollback steps

  • revert this branch

AI generated code

https://internal.qlik.dev/general/ways-of-working/code-reviews/#guidelines-for-ai-generated-code

  • this PR has been written with the help of GitHub Copilot or another generative AI tool

Copy link
Copy Markdown

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

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 null for fields that are sometimes returned as null (arrays/objects).
  • Bump library pins and update CircleCI to run unittest and 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.

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.

2 participants