Skip to content

SDK-2792-python-add-support-for-retrieving-the-extraction-image-ids-f…#452

Open
mehmet-yoti wants to merge 2 commits intodevelopmentfrom
SDK-2792-python-add-support-for-retrieving-the-extraction-image-ids-field-from-the-idv-pages
Open

SDK-2792-python-add-support-for-retrieving-the-extraction-image-ids-f…#452
mehmet-yoti wants to merge 2 commits intodevelopmentfrom
SDK-2792-python-add-support-for-retrieving-the-extraction-image-ids-field-from-the-idv-pages

Conversation

@mehmet-yoti
Copy link
Copy Markdown
Contributor

Summary

  • Add extraction_image_ids property to PageResponse to expose which media was used for
    automated extraction
  • Field is parsed as a list of UUID strings, defaults to empty list when absent

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

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 new response fields to the Doc Scan session retrieval models to expose additional metadata returned by the API (extraction image IDs for pages, and process type for breakdown items).

Changes:

  • Add extraction_image_ids to PageResponse and extend tests to validate parsing/defaulting behavior.
  • Add process to BreakdownResponse and extend tests to validate parsing/defaulting behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
yoti_python_sdk/doc_scan/session/retrieve/page_response.py Adds extraction_image_ids parsing and accessor on PageResponse.
yoti_python_sdk/tests/doc_scan/session/retrieve/test_page_response.py Adds coverage for PageResponse.extraction_image_ids.
yoti_python_sdk/doc_scan/session/retrieve/breakdown_response.py Adds process parsing and accessor on BreakdownResponse.
yoti_python_sdk/tests/doc_scan/session/retrieve/test_breakdown_response.py Adds coverage for BreakdownResponse.process.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 27 to +29
assert result.sub_check is self.SOME_SUB_CHECK
assert result.result is self.SOME_RESULT
assert result.process is self.SOME_PROCESS
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

These assertions use is to compare string values. is checks object identity and can be unreliable for strings (interning is an implementation detail), leading to flaky tests. Use == for value equality here (and ideally for the other string assertions in this test as well).

Suggested change
assert result.sub_check is self.SOME_SUB_CHECK
assert result.result is self.SOME_RESULT
assert result.process is self.SOME_PROCESS
assert result.sub_check == self.SOME_SUB_CHECK
assert result.result == self.SOME_RESULT
assert result.process == self.SOME_PROCESS

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not necessary, this will change previous pattern in code.

@nikhilPank nikhilPank self-requested a review April 7, 2026 14:15
Copy link
Copy Markdown
Contributor

@nikhilPank nikhilPank left a comment

Choose a reason for hiding this comment

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

LGTM

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